﻿using System;
using System.Collections.Generic;
using System.Globalization;
using System.Text;
using KKSG;
using MiniJSON;
using UILib;
using UnityEngine;
using XMainClient.UI.UICommon;
using XUpdater;
using XUtliPoolLib;

namespace XMainClient.UI
{
	// Token: 0x02001927 RID: 6439
	public class UiUtility : XSingleton<UiUtility>, IUiUtility, IXInterface
	{
		// Token: 0x17003B05 RID: 15109
		// (get) Token: 0x06010DC1 RID: 69057 RVA: 0x004438E9 File Offset: 0x00441AE9
		// (set) Token: 0x06010DC2 RID: 69058 RVA: 0x004438F1 File Offset: 0x00441AF1
		public bool Deprecated { get; set; }

		// Token: 0x06010DC3 RID: 69059 RVA: 0x004438FC File Offset: 0x00441AFC
		private bool FatalErrorButtonCallback(IXUIButton go)
		{
			DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetVisible(false, true);
			XSingleton<XShell>.singleton.Pause = false;
			XSingleton<XClientNetwork>.singleton.OnFatalErrorCallback();
			return true;
		}

		// Token: 0x06010DC4 RID: 69060 RVA: 0x00443934 File Offset: 0x00441B34
		public void OnFatalErrorClosed(ErrorCode code)
		{
			XSingleton<XTutorialMgr>.singleton.StopTutorial();
			XSingleton<XShell>.singleton.Pause = true;
			string @string = XStringDefineProxy.GetString(code);
			DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.Load();
			DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetSingleButtonMode(true);
			this._ShowModalDialog(@string, XStringDefineProxy.GetString(XStringDefine.COMMON_OK), "-", new ButtonClickEventHandler(this.FatalErrorButtonCallback), 300, "");
		}

		// Token: 0x06010DC5 RID: 69061 RVA: 0x004439A0 File Offset: 0x00441BA0
		public void OnFatalErrorClosed(string text)
		{
			XSingleton<XTutorialMgr>.singleton.StopTutorial();
			XSingleton<XShell>.singleton.Pause = true;
			DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.Load();
			DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetSingleButtonMode(true);
			this._ShowModalDialog(text, XStringDefineProxy.GetString(XStringDefine.COMMON_OK), "-", new ButtonClickEventHandler(this.FatalErrorButtonCallback), 300, "");
		}

		// Token: 0x06010DC6 RID: 69062 RVA: 0x00443A08 File Offset: 0x00441C08
		public void ShowErrorCode(ErrorCode code)
		{
			string @string = XStringDefineProxy.GetString(code);
			this.ShowModalDialog(@string, XStringDefineProxy.GetString(XStringDefine.COMMON_OK));
		}

		// Token: 0x06010DC7 RID: 69063 RVA: 0x00443A2C File Offset: 0x00441C2C
		internal string GetEquipName(ItemList.RowData data, XItem instanceData = null, uint profession = 0U)
		{
			if (instanceData != null && instanceData.Type == ItemType.EQUIP)
			{
				XEquipItem xequipItem = instanceData as XEquipItem;
				if (xequipItem.enhanceInfo.EnhanceLevel > 0U)
				{
					return string.Format("{0}+{1}", XSingleton<UiUtility>.singleton.ChooseProfString(data.ItemName, profession), xequipItem.enhanceInfo.EnhanceLevel.ToString());
				}
			}
			return XSingleton<UiUtility>.singleton.ChooseProfString(data.ItemName, profession);
		}

		// Token: 0x06010DC8 RID: 69064 RVA: 0x00443AAC File Offset: 0x00441CAC
		internal void ShowTooltipDialogWithSearchingCompare(XItem mainItem, IXUISprite icon = null, bool bShowButtons = true, uint profession = 0U)
		{
			if (mainItem != null)
			{
				XItem compareItem = null;
				if (mainItem.type == 1U)
				{
					EquipList.RowData equipConf = XBagDocument.GetEquipConf(mainItem.itemID);
					if (equipConf == null)
					{
						XSingleton<XDebug>.singleton.AddErrorLog("Cannot find equip config for id: ", mainItem.itemID.ToString(), null, null, null, null);
						return;
					}
					compareItem = XSingleton<XGame>.singleton.Doc.XBagDoc.EquipBag[(int)equipConf.EquipPos];
				}
				else
				{
					if (mainItem.type == 6U)
					{
						//zcg compareItem = XEmblemDocument.CheckEquipedEmblemsAttrs(XSingleton<XGame>.singleton.Doc.XBagDoc.EmblemBag, mainItem);
					}
					else
					{
						if (mainItem.type == 31U)
						{
							//zcg 
// 							ArtifactListTable.RowData artifactListRowData = ArtifactDocument.GetArtifactListRowData((uint)mainItem.itemID);
// 							bool flag6 = artifactListRowData == null;
// 							if (flag6)
// 							{
// 								XSingleton<XDebug>.singleton.AddErrorLog("Cannot find artifact config for id: ", mainItem.itemID.ToString(), null, null, null, null);
// 								return;
// 							}
// 							compareItem = XSingleton<XGame>.singleton.Doc.XBagDoc.ArtifactBag[(int)artifactListRowData.ArtifactPos];
						}
					}
				}
				this.ShowTooltipDialog(mainItem, compareItem, icon, bShowButtons, profession);
			}
		}

		// Token: 0x06010DC9 RID: 69065 RVA: 0x00443BE0 File Offset: 0x00441DE0
		internal void ShowTooltipDialog(XItem mainItem, XItem compareItem, IXUISprite icon = null, bool bShowButtons = true, uint profession = 0U)
		{
			if (mainItem != null)
			{
				if (compareItem != null && compareItem.itemID != 0 && mainItem.Type != compareItem.Type)
				{
					XSingleton<XDebug>.singleton.AddErrorLog("mainItem.Type != compareItem.Type", null, null, null, null, null);
				}
				else
				{
					//zcg 
// 					XFashionDocument specificDocument = XDocuments.GetSpecificDocument<XFashionDocument>(XFashionDocument.uuID);
 					if (DlgBase<EquipTooltipDlg, EquipTooltipDlgBehaviour>.singleton.IsLoaded())
 					{
 						DlgBase<EquipTooltipDlg, EquipTooltipDlgBehaviour>.singleton.HideToolTip(true);
 					}
 					if (DlgBase<ItemTooltipDlg, ItemTooltipDlgBehaviour>.singleton.IsLoaded())
 					{
 						DlgBase<ItemTooltipDlg, ItemTooltipDlgBehaviour>.singleton.HideToolTip(true);
 					}
					//zcg 
// 					if (DlgBase<EmblemTooltipDlg, EmblemTooltipDlgBehaviour>.singleton.IsLoaded())
// 					{
// 						DlgBase<EmblemTooltipDlg, EmblemTooltipDlgBehaviour>.singleton.HideToolTip(true);
// 					}
// 					if (DlgBase<JadeTooltipDlg, TooltipDlgBehaviour>.singleton.IsLoaded())
// 					{
// 						DlgBase<JadeTooltipDlg, TooltipDlgBehaviour>.singleton.HideToolTip(true);
// 					}
// 					if (DlgBase<FashionTooltipDlg, FashionTooltipDlgBehaviour>.singleton.IsLoaded())
// 					{
// 						DlgBase<FashionTooltipDlg, FashionTooltipDlgBehaviour>.singleton.HideToolTip(true);
// 					}
// 					if (DlgBase<ArtifactToolTipDlg, ArtifactTooltipDlgBehaviour>.singleton.IsLoaded())
// 					{
// 						DlgBase<ArtifactToolTipDlg, ArtifactTooltipDlgBehaviour>.singleton.HideToolTip(true);
// 					}
// 					if (DlgBase<FashionHairToolTipDlg, FashionHairToolTipBehaviour>.singleton.IsLoaded())
// 					{
// 						DlgBase<FashionHairToolTipDlg, FashionHairToolTipBehaviour>.singleton.HideToolTip(true);
// 					}
					ITooltipDlg tooltipDlg = mainItem.Description.TooltipDlg;
					tooltipDlg.ShowToolTip(mainItem, compareItem, bShowButtons, profession);
					tooltipDlg.ItemSelector.Select(icon);
					tooltipDlg.SetPosition(icon);
					XSingleton<TooltipParam>.singleton.Reset();
				}
			}
		}

		// Token: 0x06010DCA RID: 69066 RVA: 0x00443D41 File Offset: 0x00441F41
		public void PushBarrage(string nick, string content)
		{
			DlgBase<BroadcastDlg, BroadcastBehaviour>.singleton.Push(nick, content);
		}

		// Token: 0x06010DCB RID: 69067 RVA: 0x00443D54 File Offset: 0x00441F54
		public void StartBroadcast(bool start)
		{
			if (start)
			{
				DlgBase<BroadMiniDlg, BroadcastMiniBehaviour>.singleton.isBroadcast = true;
				DlgBase<BroadMiniDlg, BroadcastMiniBehaviour>.singleton.Show(true);
			}
			else
			{
				DlgBase<BroadMiniDlg, BroadcastMiniBehaviour>.singleton.isBroadcast = false;
				DlgBase<BroadMiniDlg, BroadcastMiniBehaviour>.singleton.Show(false);
			}
		}

		// Token: 0x06010DCC RID: 69068 RVA: 0x00443D9C File Offset: 0x00441F9C
		public void ShowDetailTooltip(int itemID, GameObject icon = null)
		{
			XItem mainItem = XBagDocument.MakeXItem(itemID, false);
			this.ShowTooltipDialog(mainItem, null, icon.GetComponent("XUISprite") as IXUISprite, false, 0U);
		}

		// Token: 0x06010DCD RID: 69069 RVA: 0x00443DD0 File Offset: 0x00441FD0
		public void ParseHeadIcon(List<uint> setid, IXUISprite spr)
		{
			if (setid == null)
			{
				spr.SetVisible(false);
			}
			else
			{
				//zcg 
// 				string text = XPrerogativeDocument.ConvertTypeToPreContent(PrerogativeType.PreHeadPortrait, setid);
// 				string text2 = string.Empty;
// 				bool flag2 = !string.IsNullOrEmpty(text);
// 				if (flag2)
// 				{
// 					string[] array = text.Split(new char[]
// 					{
// 						'='
// 					});
// 					bool flag3 = array.Length >= 2;
// 					if (flag3)
// 					{
// 						text2 = array[1];
// 					}
// 				}
// 				bool flag4 = !string.IsNullOrEmpty(text2);
// 				if (flag4)
// 				{
// 					spr.SetVisible(true);
// 					spr.SetSprite(text2);
// 				}
// 				else
				{
					spr.SetVisible(false);
				}
			}
		}

		// Token: 0x06010DCE RID: 69070 RVA: 0x00443E64 File Offset: 0x00442064
		public void ShowTooltipDialog(int itemID, GameObject icon = null)
		{
			ItemList.RowData itemConf = XBagDocument.GetItemConf(itemID);
			if (itemConf == null)
			{
				XSingleton<XDebug>.singleton.AddErrorLog("rowData == null: ", itemID.ToString(), null, null, null, null);
			}
			else
			{
				IXUISprite ixuisprite = null;
				if (null != icon)
				{
					ixuisprite = (icon.GetComponent("XUISprite") as IXUISprite);
				}
				if (itemConf.ItemType == 5)
				{
					XItem mainItem = XBagDocument.MakeXItem(itemID, false);
					XSingleton<UiUtility>.singleton.ShowTooltipDialog(mainItem, null, ixuisprite, false, 0U);
				}
				else
				{
					itemID = XBagDocument.ConvertTemplate(itemConf);
					DlgBase<ItemTooltipDlg, ItemTooltipDlgBehaviour>.singleton.ShowToolTip(itemID, 0U);
					DlgBase<ItemTooltipDlg, ItemTooltipDlgBehaviour>.singleton.ItemSelector.Select(icon);
					DlgBase<ItemTooltipDlg, ItemTooltipDlgBehaviour>.singleton.SetPosition(ixuisprite);
					XSingleton<TooltipParam>.singleton.Reset();
				}
			}
		}

		// Token: 0x06010DCF RID: 69071 RVA: 0x00443F2C File Offset: 0x0044212C
		internal void ShowOutLookDialog(XItem item, IXUISprite icon = null, uint proferssion = 0U)
		{
			if (item != null)
			{
				if (item.Type == ItemType.FASHION)
				{
					FashionList.RowData fashionConf = XBagDocument.GetFashionConf(item.itemID);
					bool flag3 = fashionConf != null && (int)fashionConf.EquipPos == XFastEnumIntEqualityComparer<FashionPosition>.ToInt(FashionPosition.Hair);
					//zcg 
// 					if (flag3)
// 					{
// 						DlgBase<FashionStorageFashionHairToolTipDlg, FashionHairToolTipBehaviour>.singleton.ShowToolTip(item, null, true, proferssion);
// 						DlgBase<FashionStorageFashionHairToolTipDlg, FashionHairToolTipBehaviour>.singleton.ItemSelector.Select(icon);
// 						DlgBase<FashionStorageFashionHairToolTipDlg, FashionHairToolTipBehaviour>.singleton.SetPosition(icon);
// 					}
// 					else
// 					{
// 						DlgBase<FashionStorageFashionToolTipDlg, FashionTooltipDlgBehaviour>.singleton.ShowToolTip(item, null, true, proferssion);
// 						DlgBase<FashionStorageFashionToolTipDlg, FashionTooltipDlgBehaviour>.singleton.ItemSelector.Select(icon);
// 						DlgBase<FashionStorageFashionToolTipDlg, FashionTooltipDlgBehaviour>.singleton.SetPosition(icon);
// 					}
					XSingleton<TooltipParam>.singleton.Reset();
				}
				else
				{
					if (item.Type == ItemType.EQUIP)
					{
						//zcg 
// 						DlgBase<FashionStorageEquipToolTipDlg, ItemTooltipDlgBehaviour>.singleton.ShowToolTip(item, null, true, proferssion);
// 						DlgBase<FashionStorageEquipToolTipDlg, ItemTooltipDlgBehaviour>.singleton.ItemSelector.Select(icon);
// 						DlgBase<FashionStorageEquipToolTipDlg, ItemTooltipDlgBehaviour>.singleton.SetPosition(icon);
						XSingleton<TooltipParam>.singleton.Reset();
					}
				}
			}
		}

		// Token: 0x06010DD0 RID: 69072 RVA: 0x00444034 File Offset: 0x00442234
		public void ShowTooltipDialog(int itemID, IXUISprite icon = null, uint profession = 0U)
		{
			ItemList.RowData itemConf = XBagDocument.GetItemConf(itemID);
			if (itemConf == null)
			{
				XSingleton<XDebug>.singleton.AddErrorLog("rowData == null: ", itemID.ToString(), null, null, null, null);
			}
			else
			{
				if (itemConf.ItemType == 5)
				{
					XItem mainItem = XBagDocument.MakeXItem(itemID, false);
					XSingleton<UiUtility>.singleton.ShowTooltipDialog(mainItem, null, icon, false, 0U);
				}
				else
				{
					itemID = XBagDocument.ConvertTemplate(itemConf);
					DlgBase<ItemTooltipDlg, ItemTooltipDlgBehaviour>.singleton.ShowToolTip(itemID, profession);
					DlgBase<ItemTooltipDlg, ItemTooltipDlgBehaviour>.singleton.ItemSelector.Select(icon);
					DlgBase<ItemTooltipDlg, ItemTooltipDlgBehaviour>.singleton.SetPosition(icon);
					XSingleton<TooltipParam>.singleton.Reset();
				}
			}
		}

		// Token: 0x06010DD1 RID: 69073 RVA: 0x004440D4 File Offset: 0x004422D4
		public void ShowTooltipDialogByUID(string strUID, GameObject icon = null)
		{
			ulong uid = 0UL;
			if (ulong.TryParse(strUID, out uid))
			{
				XItem xitem = XSingleton<XGame>.singleton.Doc.XBagDoc.GetItemByUID(uid);
				if (xitem == null)
				{
					//zcg 
// 					XFashionDocument xfashionDocument = XSingleton<XGame>.singleton.Doc.GetXComponent(XFashionDocument.uuID) as XFashionDocument;
// 					ClientFashionData clientFashionData = xfashionDocument.FindFashion(uid);
// 					bool flag3 = clientFashionData != null;
// 					if (flag3)
// 					{
// 						xitem = xfashionDocument.MakeXItem(clientFashionData);
// 					}
				}
				if (xitem != null)
				{
					IXUISprite icon2 = null;
					if (null != icon)
					{
						icon2 = (icon.GetComponent("XUISprite") as IXUISprite);
					}
					this.ShowTooltipDialog(xitem, null, icon2, false, 0U);
				}
			}
		}

		// Token: 0x06010DD2 RID: 69074 RVA: 0x0044418F File Offset: 0x0044238F
		public void ShowSystemHelp(string main, string title, string label)
		{
			DlgBase<SystemHelpDlg, SystemHelpBehaviour>.singleton.Load();
			this._ShowSystemHelp(main, title, label, 50);
		}

		// Token: 0x06010DD3 RID: 69075 RVA: 0x004441A9 File Offset: 0x004423A9
		public void ShowModalDialogWithTitle(string title, string label, string firstBtn, ButtonClickEventHandler handler = null, int depth = 50)
		{
			DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.Load();
			DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetSingleButtonMode(true);
			DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetCloseButtonVisible(false);
			this._ShowModalDialog(label, firstBtn, "-", handler, depth, title);
		}

		// Token: 0x06010DD4 RID: 69076 RVA: 0x004441E2 File Offset: 0x004423E2
		public void ShowModalDialog(string label, string firstBtn)
		{
			DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.Load();
			DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetSingleButtonMode(true);
			this._ShowModalDialog(label, firstBtn, "-", null, 50, "");
		}

		// Token: 0x06010DD5 RID: 69077 RVA: 0x00444212 File Offset: 0x00442412
		public void ShowModalDialog(string label, string firstBtn, ButtonClickEventHandler handler = null, int depth = 50)
		{
			DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.Load();
			DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetSingleButtonMode(true);
			this._ShowModalDialog(label, firstBtn, "-", handler, depth, "");
		}

		// Token: 0x06010DD6 RID: 69078 RVA: 0x00444242 File Offset: 0x00442442
		public void ShowModalDialog(string label, string firstBtn, string secondBtn, ButtonClickEventHandler handler = null)
		{
			DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.Load();
			DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetSingleButtonMode(false);
			this._ShowModalDialog(label, firstBtn, secondBtn, handler, 50, "");
		}

		// Token: 0x06010DD7 RID: 69079 RVA: 0x0044426F File Offset: 0x0044246F
		public void ShowModalDialog(string label, string firstBtn, string secondBtn, ButtonClickEventHandler handler = null, int depth = 50)
		{
			DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.Load();
			DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetSingleButtonMode(false);
			this._ShowModalDialog(label, firstBtn, secondBtn, handler, depth, "");
		}

		// Token: 0x06010DD8 RID: 69080 RVA: 0x0044429C File Offset: 0x0044249C
		public void ShowModalDialog(string label, string firstBtn, string secondBtn, ButtonClickEventHandler handler, ButtonClickEventHandler handler2, bool showCloseBtn = false, XTempTipDefine showNoTip = XTempTipDefine.OD_START, int depth = 50)
		{
			DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.StartTip = showNoTip;
			DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.Load();
			DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetSingleButtonMode(false);
			DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetCloseButtonVisible(showCloseBtn);
			this._ShowModalDialog(label, firstBtn, secondBtn, handler, handler2, depth);
		}

		// Token: 0x06010DD9 RID: 69081 RVA: 0x004442EC File Offset: 0x004424EC
		public void ShowModalDialog(string title, string label, string firstBtn, string secondBtn, ButtonClickEventHandler handler, ButtonClickEventHandler handler2, bool showCloseBtn = false, XTempTipDefine showNoTip = XTempTipDefine.OD_START, int depth = 50)
		{
			DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.StartTip = showNoTip;
			DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.Load();
			DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetSingleButtonMode(false);
			DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetCloseButtonVisible(showCloseBtn);
			DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetTitle(title);
			this._ShowModalDialog(label, firstBtn, secondBtn, handler, handler2, depth);
		}

		// Token: 0x06010DDA RID: 69082 RVA: 0x00444348 File Offset: 0x00442548
		public void ShowModalDialog(string message, ButtonClickEventHandler handler)
		{
			string @string = XStringDefineProxy.GetString("COMMON_OK");
			string string2 = XStringDefineProxy.GetString("COMMON_CANCEL");
			this.ShowModalDialog(message, @string, string2, handler);
		}

		// Token: 0x06010DDB RID: 69083 RVA: 0x00444378 File Offset: 0x00442578
		protected void _ShowModalDialog(string label, string firstBtn, string secondBtn, ButtonClickEventHandler handler, ButtonClickEventHandler handler2, int depth = 50)
		{
			DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetPanelDepth(depth);
			DlgBase<ModalDlg, ModalDlgBehaviour>.singleton._bHasGrey = false;
			DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetVisible(false, true);
			DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetLabelsWithSymbols(label, firstBtn, secondBtn);
			DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetModalCallback(handler, handler2);
			DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetTweenTargetAndPlay(DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.uiBehaviour.gameObject);
		}

		// Token: 0x06010DDC RID: 69084 RVA: 0x004443E4 File Offset: 0x004425E4
		protected void _ShowModalDialog(string label, string firstBtn, string secondBtn, ButtonClickEventHandler handler = null, int depth = 50, string title = "")
		{
			DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetPanelDepth(depth);
			DlgBase<ModalDlg, ModalDlgBehaviour>.singleton._bHasGrey = false;
			DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetVisible(false, true);
			DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetTitle(title);
			DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetLabelsWithSymbols(label, firstBtn, secondBtn);
			if (handler == null)
			{
				DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetModalCallback(new ButtonClickEventHandler(this.FrButtonCallback), null);
			}
			else
			{
				DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetModalCallback(handler, null);
			}
			DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetTweenTargetAndPlay(DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.uiBehaviour.gameObject);
		}

		// Token: 0x06010DDD RID: 69085 RVA: 0x00444480 File Offset: 0x00442680
		protected void _ShowSystemHelp(string main, string title, string label, int depth = 50)
		{
			DlgBase<SystemHelpDlg, SystemHelpBehaviour>.singleton.SetPanelDepth(depth);
			DlgBase<SystemHelpDlg, SystemHelpBehaviour>.singleton._bHasGrey = false;
			DlgBase<SystemHelpDlg, SystemHelpBehaviour>.singleton.SetVisible(false, true);
			DlgBase<SystemHelpDlg, SystemHelpBehaviour>.singleton.SetLabels(main, title, label);
			DlgBase<SystemHelpDlg, SystemHelpBehaviour>.singleton.SetTweenTargetAndPlay(DlgBase<SystemHelpDlg, SystemHelpBehaviour>.singleton.uiBehaviour.gameObject);
		}

		// Token: 0x06010DDE RID: 69086 RVA: 0x004444DC File Offset: 0x004426DC
		public void ShowLeaveTeamModalDialog(ButtonClickEventHandler handler, string tips = "")
		{
			string label;
			if (tips == "")
			{
				label = XStringDefineProxy.GetString("TEAM_SHOULD_LEAVE_TEAM_CONFIRM");
			}
			else
			{
				label = tips;
			}
			string @string = XStringDefineProxy.GetString("COMMON_OK");
			string string2 = XStringDefineProxy.GetString("COMMON_CANCEL");
			XSingleton<UiUtility>.singleton.ShowModalDialog(label, @string, string2, handler);
		}

		// Token: 0x06010DDF RID: 69087 RVA: 0x00444530 File Offset: 0x00442730
		public void CloseHelp()
		{
			if (DlgBase<SystemHelpDlg, SystemHelpBehaviour>.singleton.IsVisible())
			{
				DlgBase<SystemHelpDlg, SystemHelpBehaviour>.singleton.SetVisible(false, true);
			}
		}

		// Token: 0x06010DE0 RID: 69088 RVA: 0x0044455C File Offset: 0x0044275C
		public void CloseModalDlg()
		{
			if (DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.IsVisible())
			{
				DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetVisible(false, true);
			}
		}

		// Token: 0x06010DE1 RID: 69089 RVA: 0x00444588 File Offset: 0x00442788
		private bool FrButtonCallback(IXUIButton go)
		{
			DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetVisible(false, true);
			XSingleton<XShell>.singleton.Pause = false;
			return true;
		}

		// Token: 0x06010DE2 RID: 69090 RVA: 0x004445B4 File Offset: 0x004427B4
		public string RoleTypeToString(RoleType type)
		{
			return "UnknownProf";
		}

		// Token: 0x06010DE3 RID: 69091 RVA: 0x004445CC File Offset: 0x004427CC
		private Vector3 GetScreenPointMin()
		{
			Vector2 vector = new Vector2((float)(-(float)XSingleton<XGameUI>.singleton.Base_UI_Width / 2), (float)(XSingleton<XGameUI>.singleton.Base_UI_Height / 2));
			Vector3 vector2 = XSingleton<XGameUI>.singleton.UIRoot.TransformPoint(vector);
			return XSingleton<XGameUI>.singleton.UICamera.WorldToScreenPoint(vector2);
		}

		// Token: 0x06010DE4 RID: 69092 RVA: 0x00444628 File Offset: 0x00442828
		private Vector3 GetScreenPointMax()
		{
			Vector2 vector = new Vector2((float)(XSingleton<XGameUI>.singleton.Base_UI_Width / 2), (float)(-(float)XSingleton<XGameUI>.singleton.Base_UI_Height / 2));
			Vector3 vector2 = XSingleton<XGameUI>.singleton.UIRoot.TransformPoint(vector);
			return XSingleton<XGameUI>.singleton.UICamera.WorldToScreenPoint(vector2);
		}

		// Token: 0x06010DE5 RID: 69093 RVA: 0x00444684 File Offset: 0x00442884
		public string GetColorStr(Color color)
		{
			return string.Format("{0:X2}{1:X2}{2:X2}", (uint)(color.r * 255f), (uint)(color.g * 255f), (uint)(color.b * 255f));
		}

		// Token: 0x06010DE6 RID: 69094 RVA: 0x004446D8 File Offset: 0x004428D8
		public Color GetColor(float[] rgb)
		{
			Color result;
			if (rgb == null)
			{
				result = Color.white;
			}
			else
			{
				if (rgb.Length > 3)
				{
					result = new Color(rgb[0] / 255f, rgb[1] / 255f, rgb[2] / 255f, rgb[3] / 100f);
				}
				else
				{
					if (rgb.Length > 2)
					{
						result = new Color(rgb[0] / 255f, rgb[1] / 255f, rgb[2] / 255f);
					}
					else
					{
						if (rgb.Length > 1)
						{
							result = new Color(rgb[0] / 255f, rgb[1] / 255f, 1f);
						}
						else
						{
							if (rgb.Length != 0)
							{
								result = new Color(rgb[0] / 255f, 1f, 1f);
							}
							else
							{
								result = Color.white;
							}
						}
					}
				}
			}
			return result;
		}

		// Token: 0x06010DE7 RID: 69095 RVA: 0x004447BC File Offset: 0x004429BC
		public string GetItemQualityFrame(int quality, int type)
		{
			string result;
			switch (quality)
			{
			case 0:
				result = "kuang_dj_0";
				break;
			case 1:
				result = "kuang_dj_1";
				break;
			case 2:
				result = "kuang_dj_2";
				break;
			case 3:
				result = "kuang_dj_3";
				break;
			case 4:
				result = "kuang_dj_4";
				break;
			case 5:
				result = "kuang_dj_5";
				break;
			default:
				result = "kuang_dj_0";
				break;
			}
			return result;
		}

		// Token: 0x06010DE8 RID: 69096 RVA: 0x00444828 File Offset: 0x00442A28
		public string GetItemQualityRGB(int quality)
		{
			string value;
			switch (quality)
			{
			case 0:
				value = XSingleton<XGlobalConfig>.singleton.GetValue("Quality0Color");
				break;
			case 1:
				value = XSingleton<XGlobalConfig>.singleton.GetValue("Quality1Color");
				break;
			case 2:
				value = XSingleton<XGlobalConfig>.singleton.GetValue("Quality2Color");
				break;
			case 3:
				value = XSingleton<XGlobalConfig>.singleton.GetValue("Quality3Color");
				break;
			case 4:
				value = XSingleton<XGlobalConfig>.singleton.GetValue("Quality4Color");
				break;
			case 5:
				value = XSingleton<XGlobalConfig>.singleton.GetValue("Quality5Color");
				break;
			default:
				value = XSingleton<XGlobalConfig>.singleton.GetValue("Quality0Color");
				break;
			}
			return value;
		}

		// Token: 0x06010DE9 RID: 69097 RVA: 0x004448D8 File Offset: 0x00442AD8
		public Color GetItemQualityColor(int quality)
		{
			string itemQualityColorStr = this.GetItemQualityColorStr(quality);
			Color result;
			if (string.IsNullOrEmpty(itemQualityColorStr))
			{
				result = Color.white;
			}
			else
			{
				result = new Color32(Convert.ToByte(itemQualityColorStr.Substring(0, 2), 16), Convert.ToByte(itemQualityColorStr.Substring(2, 2), 16), Convert.ToByte(itemQualityColorStr.Substring(4, 2), 16), byte.MaxValue);
			}
			return result;
		}

		// Token: 0x06010DEA RID: 69098 RVA: 0x00444940 File Offset: 0x00442B40
		public Color ConvertRGBStringToColor(string c)
		{
			return new Color32(Convert.ToByte(c.Substring(0, 2), 16), Convert.ToByte(c.Substring(2, 2), 16), Convert.ToByte(c.Substring(4, 2), 16), byte.MaxValue);
		}

		// Token: 0x06010DEB RID: 69099 RVA: 0x00444990 File Offset: 0x00442B90
		public string GetItemQualityColorStr(int quality)
		{
			string result = "";
			switch (quality)
			{
			case 0:
				result = XSingleton<XGlobalConfig>.singleton.GetValue("Quality0Color");
				break;
			case 1:
				result = XSingleton<XGlobalConfig>.singleton.GetValue("Quality1Color");
				break;
			case 2:
				result = XSingleton<XGlobalConfig>.singleton.GetValue("Quality2Color");
				break;
			case 3:
				result = XSingleton<XGlobalConfig>.singleton.GetValue("Quality3Color");
				break;
			case 4:
				result = XSingleton<XGlobalConfig>.singleton.GetValue("Quality4Color");
				break;
			case 5:
				result = XSingleton<XGlobalConfig>.singleton.GetValue("Quality5Color");
				break;
			}
			return result;
		}

		// Token: 0x06010DEC RID: 69100 RVA: 0x00444A38 File Offset: 0x00442C38
		public string GetItemQualityIcon(int quality)
		{
			string result;
			switch (quality)
			{
			case 0:
				result = "icondjdj_0";
				break;
			case 1:
				result = "icondjdj_1";
				break;
			case 2:
				result = "icondjdj_2";
				break;
			case 3:
				result = "icondjdj_3";
				break;
			case 4:
				result = "icondjdj_4";
				break;
			case 5:
				result = "icondjdj_5";
				break;
			default:
				result = "null";
				break;
			}
			return result;
		}

		// Token: 0x06010DED RID: 69101 RVA: 0x00444AA4 File Offset: 0x00442CA4
		public string GetItemQualityName(int quality)
		{
			string result;
			switch (quality)
			{
			case 0:
				result = "D";
				break;
			case 1:
				result = "C";
				break;
			case 2:
				result = "B";
				break;
			case 3:
				result = "A";
				break;
			case 4:
				result = "S";
				break;
			case 5:
				result = "L";
				break;
			default:
				result = string.Empty;
				break;
			}
			return result;
		}

		// Token: 0x06010DEE RID: 69102 RVA: 0x00444B10 File Offset: 0x00442D10
		public string GetScorePic(int score)
		{
			string result;
			switch (score)
			{
			case 1:
				result = "F-S";
				break;
			case 2:
				result = "F-SS";
				break;
			case 3:
				result = "F-SSS";
				break;
			default:
				result = "";
				break;
			}
			return result;
		}

		// Token: 0x06010DEF RID: 69103 RVA: 0x00444B58 File Offset: 0x00442D58
		public string GetEquipFusionIconName(int fusionLevel)
		{
			string result = string.Empty;
			switch (fusionLevel)
			{
			case 1:
				result = "equip_0_00000";
				break;
			case 2:
				result = "equip_1_00000";
				break;
			case 3:
				result = "equip_2_00000";
				break;
			case 4:
				result = "equip_3_00000";
				break;
			case 5:
				result = "equip_4_00000";
				break;
			default:
				result = "equip_0_00000";
				break;
			}
			return result;
		}

		// Token: 0x06010DF0 RID: 69104 RVA: 0x00444BC4 File Offset: 0x00442DC4
		internal string GetEquipPartName(EquipPosition part, bool bPrefix = true)
		{
			string result;
			switch (part)
			{
			case EquipPosition.EQUIP_START:
				result = XStringDefineProxy.GetString(XStringDefine.ITEM_PART_HEAD);
				break;
			case EquipPosition.Upperbody:
				result = XStringDefineProxy.GetString(XStringDefine.ITEM_PART_UPPERBODY);
				break;
			case EquipPosition.Lowerbody:
				result = XStringDefineProxy.GetString(XStringDefine.ITEM_PART_LOWERBODY);
				break;
			case EquipPosition.Gloves:
				result = XStringDefineProxy.GetString(XStringDefine.ITEM_PART_GLOVES);
				break;
			case EquipPosition.Boots:
				result = XStringDefineProxy.GetString(XStringDefine.ITEM_PART_BOOTS);
				break;
			case EquipPosition.Mainweapon:
				result = XStringDefineProxy.GetString(XStringDefine.ITEM_PART_MAINWEAPON);
				break;
			case EquipPosition.Secondaryweapon:
				result = XStringDefineProxy.GetString(XStringDefine.ITEM_PART_SECWEAPON);
				break;
			case EquipPosition.Necklace:
				result = XStringDefineProxy.GetString(XStringDefine.ITEM_PART_NECKLACE);
				break;
			case EquipPosition.Earrings:
				result = XStringDefineProxy.GetString(XStringDefine.ITEM_PART_EARRING);
				break;
			case EquipPosition.Rings:
				result = XStringDefineProxy.GetString(XStringDefine.ITEM_PART_RING1);
				break;
			default:
				result = "";
				break;
			}
			return result;
		}

		// Token: 0x06010DF1 RID: 69105 RVA: 0x00444C94 File Offset: 0x00442E94
		internal string GetFashionPartName(FashionPosition part, bool bPrefix = true)
		{
			switch (part)
			{
			case FashionPosition.FASHION_START:
				return (bPrefix ? XStringDefineProxy.GetString(XStringDefine.FASHION_PREFIX) : "") + XStringDefineProxy.GetString(XStringDefine.FASHION_HEAD);
			case FashionPosition.FashionUpperBody:
				return (bPrefix ? XStringDefineProxy.GetString(XStringDefine.FASHION_PREFIX) : "") + XStringDefineProxy.GetString(XStringDefine.FASHION_UPPERBODY);
			case FashionPosition.FashionLowerBody:
				return (bPrefix ? XStringDefineProxy.GetString(XStringDefine.FASHION_PREFIX) : "") + XStringDefineProxy.GetString(XStringDefine.FASHION_LOWERBODY);
			case FashionPosition.FashionGloves:
				return (bPrefix ? XStringDefineProxy.GetString(XStringDefine.FASHION_PREFIX) : "") + XStringDefineProxy.GetString(XStringDefine.FASHION_GLOVES);
			case FashionPosition.FashionBoots:
				return (bPrefix ? XStringDefineProxy.GetString(XStringDefine.FASHION_PREFIX) : "") + XStringDefineProxy.GetString(XStringDefine.FASHION_BOOTS);
			case FashionPosition.FashionMainWeapon:
				return (bPrefix ? XStringDefineProxy.GetString(XStringDefine.FASHION_PREFIX) : "") + XStringDefineProxy.GetString(XStringDefine.FASHION_MAINWEAPON);
			case FashionPosition.FashionSecondaryWeapon:
				return (bPrefix ? XStringDefineProxy.GetString(XStringDefine.FASHION_PREFIX) : "") + XStringDefineProxy.GetString(XStringDefine.FASHION_SECWEAPON);
			case FashionPosition.FashionWings:
				return (bPrefix ? XStringDefineProxy.GetString(XStringDefine.FASHION_PREFIX) : "") + XStringDefineProxy.GetString(XStringDefine.FASHION_WINGS);
			case FashionPosition.FashionTail:
				return (bPrefix ? XStringDefineProxy.GetString(XStringDefine.FASHION_PREFIX) : "") + XStringDefineProxy.GetString(XStringDefine.FASHION_TAIL);
			case FashionPosition.FashionDecal:
				return (bPrefix ? XStringDefineProxy.GetString(XStringDefine.FASHION_PREFIX) : "") + XStringDefineProxy.GetString(XStringDefine.FASHION_DECAL);
			case FashionPosition.Hair:
				return (bPrefix ? XStringDefineProxy.GetString(XStringDefine.FASHION_PREFIX) : "") + XStringDefineProxy.GetString(XStringDefine.FASHION_HAIR);
			}
			return "";
		}

		// Token: 0x06010DF2 RID: 69106 RVA: 0x00444EA0 File Offset: 0x004430A0
		internal string GetArtifactPartName(ArtifactPosition part, bool bPrefix = true)
		{
			string result;
			switch (part)
			{
			case ArtifactPosition.ARTIFACT_START:
				result = XStringDefineProxy.GetString(XStringDefine.ARTIFACT_ANSAB);
				break;
			case ArtifactPosition.Grail:
				result = XStringDefineProxy.GetString(XStringDefine.ARTIFACT_GRAIL);
				break;
			case ArtifactPosition.Battleheart:
				result = XStringDefineProxy.GetString(XStringDefine.ARTIFACT_BATTLEHEART);
				break;
			case ArtifactPosition.DragonHorn:
				result = XStringDefineProxy.GetString(XStringDefine.ARTIFACT_DRAGONHORN);
				break;
			default:
				result = "";
				break;
			}
			return result;
		}

		// Token: 0x06010DF3 RID: 69107 RVA: 0x00444F08 File Offset: 0x00443108
		public string ChooseProfString(List<string> ProfStringList, uint basicTypeId = 0U)
		{
			string result;
			if (ProfStringList.Count == 1)
			{
				result = ProfStringList[0];
			}
			else
			{
				if (ProfStringList.Count == 0)
				{
					result = "";
				}
				else
				{
					if (basicTypeId <= 0U)
					{
						basicTypeId = XItemDrawerParam.DefaultProfession;
					}
					int index = (int)(basicTypeId - 1U);
					result = ProfStringList[index];
				}
			}
			return result;
		}

		// Token: 0x06010DF4 RID: 69108 RVA: 0x00444F68 File Offset: 0x00443168
		public string ChooseProfString(string[] ProfStringList, uint basicTypeId = 0U)
		{
			string result;
			if (ProfStringList == null || ProfStringList.Length == 0)
			{
				result = "";
			}
			else
			{
				if (ProfStringList.Length == 1)
				{
					result = ProfStringList[0];
				}
				else
				{
					if (basicTypeId <= 0U)
					{
						basicTypeId = XItemDrawerParam.DefaultProfession;
					}
					int num = (int)(basicTypeId - 1U);
					if (num < 0 || num >= ProfStringList.Length)
					{
						XSingleton<XDebug>.singleton.AddErrorLog("There's no data for prof ", basicTypeId.ToString(), ", data: {", string.Join(", ", ProfStringList), "}", null);
						result = string.Empty;
					}
					else
					{
						result = ProfStringList[num];
					}
				}
			}
			return result;
		}

		// Token: 0x06010DF5 RID: 69109 RVA: 0x0044500C File Offset: 0x0044320C
		internal T ChooseProfData<T>(List<T> ProfDataList, uint basicTypeId = 0U)
		{
			T result;
			if (ProfDataList == null || ProfDataList.Count == 0)
			{
				result = default(T);
			}
			else
			{
				if (ProfDataList.Count == 1)
				{
					result = ProfDataList[0];
				}
				else
				{
					if (basicTypeId <= 0U)
					{
						basicTypeId = XItemDrawerParam.DefaultProfession;
					}
					int num = (int)(basicTypeId - 1U);
					if (num < 0 || num >= ProfDataList.Count)
					{
						XSingleton<XCommon>.singleton.shareSB.Length = 0;
						for (int i = 0; i < ProfDataList.Count; i++)
						{
							if (i != 0)
							{
								XSingleton<XCommon>.singleton.shareSB.Append(", ");
							}
							StringBuilder shareSB = XSingleton<XCommon>.singleton.shareSB;
							T t = ProfDataList[i];
							shareSB.Append(t.ToString());
						}
						XSingleton<XDebug>.singleton.AddErrorLog("There's no data for prof ", basicTypeId.ToString(), ", data: {", XSingleton<XCommon>.singleton.shareSB.ToString(), "}", null);
						result = default(T);
					}
					else
					{
						result = ProfDataList[num];
					}
				}
			}
			return result;
		}

		// Token: 0x06010DF6 RID: 69110 RVA: 0x00445150 File Offset: 0x00443350
		internal T ChooseProfData<T>(T[] ProfDataList, uint basicTypeId = 0U)
		{
			T result;
			if (ProfDataList == null || ProfDataList.Length == 0)
			{
				result = default(T);
			}
			else
			{
				if (ProfDataList.Length == 1)
				{
					result = ProfDataList[0];
				}
				else
				{
					if (basicTypeId == 0U)
					{
						basicTypeId = XItemDrawerParam.DefaultProfession;
					}
					int num = (int)(basicTypeId - 1U);
					if (num < 0 || num >= ProfDataList.Length)
					{
						XSingleton<XCommon>.singleton.shareSB.Length = 0;
						for (int i = 0; i < ProfDataList.Length; i++)
						{
							if (i != 0)
							{
								XSingleton<XCommon>.singleton.shareSB.Append(", ");
							}
							XSingleton<XCommon>.singleton.shareSB.Append(ProfDataList[i].ToString());
						}
						XSingleton<XDebug>.singleton.AddErrorLog("There's no data for prof ", basicTypeId.ToString(), ", data: {", XSingleton<XCommon>.singleton.shareSB.ToString(), "}", null);
						result = default(T);
					}
					else
					{
						result = ProfDataList[num];
					}
				}
			}
			return result;
		}

		// Token: 0x06010DF7 RID: 69111 RVA: 0x00445284 File Offset: 0x00443484
		internal T ChooseProfData<T>(ref SeqListRef<T> ProfDataList, uint basicTypeId = 0U, int index = 0)
		{
			T result;
			if (ProfDataList.Count == 0)
			{
				result = default(T);
			}
			else
			{
				if (ProfDataList.Count == 1)
				{
					result = ProfDataList[0, index];
				}
				else
				{
					if (basicTypeId == 0U)
					{
						basicTypeId = XItemDrawerParam.DefaultProfession;
					}
					int num = (int)(basicTypeId - 1U);
					if (num < 0 || num >= ProfDataList.Count)
					{
						XSingleton<XCommon>.singleton.shareSB.Length = 0;
						for (int i = 0; i < ProfDataList.Count; i++)
						{
							if (i != 0)
							{
								XSingleton<XCommon>.singleton.shareSB.Append(", ");
							}
							StringBuilder shareSB = XSingleton<XCommon>.singleton.shareSB;
							T t = ProfDataList[i, index];
							shareSB.Append(t.ToString());
						}
						XSingleton<XDebug>.singleton.AddErrorLog("There's no data for prof ", basicTypeId.ToString(), ", data: {", XSingleton<XCommon>.singleton.shareSB.ToString(), "}", null);
						result = default(T);
					}
					else
					{
						result = ProfDataList[num, index];
					}
				}
			}
			return result;
		}

		// Token: 0x06010DF8 RID: 69112 RVA: 0x004453C0 File Offset: 0x004435C0
		internal string ReplaceReturn(string s)
		{
			return s.Replace("{n}", "\n");
		}

		// Token: 0x06010DF9 RID: 69113 RVA: 0x004453E4 File Offset: 0x004435E4
		public void AddChild(Transform parent, Transform child)
		{
			child.parent = parent;
			child.localPosition = Vector3.zero;
			child.localRotation = Quaternion.identity;
			child.localScale = Vector3.one;
			XSingleton<XGameUI>.singleton.m_uiTool.MarkParentAsChanged(child.gameObject);
		}

		// Token: 0x06010DFA RID: 69114 RVA: 0x00445434 File Offset: 0x00443634
		public void AddChild(GameObject parent, GameObject child)
		{
			child.transform.parent = parent.transform;
			child.transform.localPosition = Vector3.zero;
			child.transform.localRotation = Quaternion.identity;
			child.transform.localScale = Vector3.one;
			XSingleton<XGameUI>.singleton.m_uiTool.MarkParentAsChanged(child.gameObject);
		}

		// Token: 0x06010DFB RID: 69115 RVA: 0x004454A0 File Offset: 0x004436A0
		public void AddChildNoMark(GameObject parent, GameObject child)
		{
			child.transform.parent = parent.transform;
			child.transform.localPosition = Vector3.zero;
			child.transform.localRotation = Quaternion.identity;
			child.transform.localScale = Vector3.one;
		}

		// Token: 0x06010DFC RID: 69116 RVA: 0x004454F4 File Offset: 0x004436F4
		public void AddChild(IUIRect parent, GameObject child, IXUIPanel panel)
		{
			child.transform.parent = parent.transform;
			child.transform.localPosition = Vector3.zero;
			child.transform.localRotation = Quaternion.identity;
			child.transform.localScale = Vector3.one;
			if (XSingleton<XGameUI>.singleton.m_uiTool != null)
			{
				XSingleton<XGameUI>.singleton.m_uiTool.ChangePanel(child, parent, panel);
			}
		}

		// Token: 0x06010DFD RID: 69117 RVA: 0x00445570 File Offset: 0x00443770
		public long GetTimeStamp()
		{
			return (DateTime.Now.ToUniversalTime().Ticks - 621355968000000000L) / 10000000L;
		}

		// Token: 0x06010DFE RID: 69118 RVA: 0x004455A8 File Offset: 0x004437A8
		public string TimeFormatSince1970(int elapsedSeconds, string format, bool isCountTimeZone = false)
		{
			return this.TimeNow((double)elapsedSeconds, isCountTimeZone).ToString(format);
		}

		// Token: 0x06010DFF RID: 69119 RVA: 0x004455CC File Offset: 0x004437CC
		public DateTime TimeNow(double elapsedSeconds, bool isCountTimeZone = false)
		{
			int num = 0;
			if (isCountTimeZone)
			{
				num = TimeZone.CurrentTimeZone.GetUtcOffset(DateTime.Now).Hours;
			}
			DateTime result = new DateTime(1970, 1, 1, 0, 0, 0);
			elapsedSeconds = Math.Max(0.0, elapsedSeconds);
			result = result.AddSeconds(elapsedSeconds + (double)(num * 3600));
			return result;
		}

		// Token: 0x06010E00 RID: 69120 RVA: 0x00445634 File Offset: 0x00443834
		public double TimeFormatLastTime(double elapsedSeconds, bool isCountTimeZone = false)
		{
			return (this.TimeNow(elapsedSeconds, isCountTimeZone) - DateTime.Now).TotalSeconds;
		}

		// Token: 0x06010E01 RID: 69121 RVA: 0x00445660 File Offset: 0x00443860
		public string TimeFormatString(int totalSecond, int lowCount = 0, int upCount = 3, int minUnit = 4, bool isCarry = false, bool needPadLeft = true)
		{
			this._Timebuilder.Length = 0;
			upCount = Math.Min(3, upCount);
			int num = 2 + (3 - upCount);
			if (isCarry)
			{
				totalSecond = (int)Math.Ceiling((double)totalSecond / (double)this.TimeDuaration[minUnit]) * this.TimeDuaration[minUnit];
			}
			int i = num;
			while (i < 5)
			{
				int num2 = totalSecond / this.TimeDuaration[i];
				totalSecond %= this.TimeDuaration[i];
				//bool flag = 5 - i > 4 - minUnit + lowCount && this._Timebuilder.Length == 0;
				if (/*!flag*/(5 - i <= 4 - minUnit + lowCount) || (this._Timebuilder.Length != 0))
				{
					goto IL_96;
				}
				if (num2 != 0)
				{
					goto IL_96;
				}
				IL_118:
				i++;
				continue;
				IL_96:
				if (this._Timebuilder.Length != 0)
				{
					this._Timebuilder.Append(":");
				}
				if (i == 2 || !needPadLeft)
				{
					this._Timebuilder.Append(num2.ToString());
				}
				else
				{
					this._Timebuilder.Append(num2.ToString().PadLeft(2, '0'));
				}
				if (i == minUnit)
				{
					return this._Timebuilder.ToString();
				}
				goto IL_118;
			}
			return this._Timebuilder.ToString();
		}

		// Token: 0x06010E02 RID: 69122 RVA: 0x004457A8 File Offset: 0x004439A8
		public string TimeFormatString(float totalSecondFloat, int lowCount = 0, int upCount = 3, int minUnit = 4, bool isCarry = false)
		{
			this.TimeFormatString((int)totalSecondFloat, lowCount, upCount, minUnit, isCarry, true);
			totalSecondFloat %= 1f;
			totalSecondFloat *= 100f;
			this._Timebuilder.Append(string.Format(".{0}", ((int)totalSecondFloat).ToString().PadLeft(2, '0')));
			return this._Timebuilder.ToString();
		}

		// Token: 0x06010E03 RID: 69123 RVA: 0x00445810 File Offset: 0x00443A10
		public string TimeAgoFormatString(int totalSecond)
		{
			string @string;
			if (totalSecond < 0)
			{
				@string = XStringDefineProxy.GetString("ONLINE");
			}
			else
			{
				for (int i = 0; i < 5; i++)
				{
					int num = this.TimeDuaration[i];
					int num2 = totalSecond / num;
					if (num2 > 0)
					{
						return string.Format("{0}{1}{2}", num2.ToString(), XStringDefineProxy.GetString(this.TimeDuarationName[i]), XStringDefineProxy.GetString("AGO"));
					}
				}
				@string = XStringDefineProxy.GetString("JUSTNOW");
			}
			return @string;
		}

		// Token: 0x06010E04 RID: 69124 RVA: 0x004458A0 File Offset: 0x00443AA0
		public string TimeOnOrOutFromString(int totalSecond)
		{
			string @string;
			if (totalSecond < 0)
			{
				@string = XStringDefineProxy.GetString("ONLINE");
			}
			else
			{
				@string = XStringDefineProxy.GetString("OUTLINE");
			}
			return @string;
		}

		// Token: 0x06010E05 RID: 69125 RVA: 0x004458D4 File Offset: 0x00443AD4
		public string TimeAccFormatString(int totalSecond, int minTime, int maxTime = 0)
		{
			string @string;
			if (totalSecond < 0)
			{
				@string = XStringDefineProxy.GetString("ONLINE");
			}
			else
			{
				for (int i = maxTime; i < 5; i++)
				{
					int num = this.TimeDuaration[i];
					int num2 = totalSecond / num;
					if (num2 > 0 || i == minTime)
					{
						return string.Format("{0}{1}", ((num2 > 0) ? num2 : 1).ToString(), XStringDefineProxy.GetString(this.TimeDuarationName[i]));
					}
				}
				@string = XStringDefineProxy.GetString("JUSTNOW");
			}
			return @string;
		}

		// Token: 0x06010E06 RID: 69126 RVA: 0x0044596C File Offset: 0x00443B6C
		public string TimeDuarationFormatString(int totalSecond, int minTime = 5)
		{
			StringBuilder stringBuilder = new StringBuilder();
			bool flag = false;
			if (totalSecond <= 0)
			{
				stringBuilder.Append(0).Append(XStringDefineProxy.GetString("SECOND_DUARATION"));
			}
			else
			{
				for (int i = 0; i < minTime; i++)
				{
					int num = this.TimeDuaration[i];
					int num2 = totalSecond / num;
					if (num2 > 0)
					{
						flag = true;
					}
					if (flag)
					{
						stringBuilder.Append(num2).Append(XStringDefineProxy.GetString(this.TimeName[i]));
					}
					totalSecond -= num2 * num;
					if (totalSecond == 0)
					{
						break;
					}
				}
			}
			return stringBuilder.ToString();
		}

		// Token: 0x06010E07 RID: 69127 RVA: 0x00445A20 File Offset: 0x00443C20
		public string TimeDuarationFormatSizeString(int totalSecond, int size = 5, int start = 0)
		{
			StringBuilder stringBuilder = new StringBuilder();
			bool flag = false;
			int num = 0;
			if (totalSecond <= 0)
			{
				stringBuilder.Append(0).Append(XStringDefineProxy.GetString("SECOND_DUARATION"));
			}
			else
			{
				for (int i = start; i < 5; i++)
				{
					int num2 = this.TimeDuaration[i];
					int num3 = totalSecond / num2;
					if (num3 > 0)
					{
						flag = true;
					}
					if (flag)
					{
						num++;
						stringBuilder.Append(num3).Append(XStringDefineProxy.GetString(this.TimeName[i]));
					}
					totalSecond -= num3 * num2;
					if (totalSecond == 0 || num >= size)
					{
						break;
					}
				}
			}
			return stringBuilder.ToString();
		}

		// Token: 0x06010E08 RID: 69128 RVA: 0x00445AE8 File Offset: 0x00443CE8
		public string TimeDurationBackFormatString(int totalSecond, int minTime = 5)
		{
			StringBuilder stringBuilder = new StringBuilder();
			bool flag = false;
			if (totalSecond <= 0)
			{
				stringBuilder.Append(0).Append(XStringDefineProxy.GetString("SECOND_DUARATION"));
			}
			else
			{
				for (int i = 0; i < minTime; i++)
				{
					int num = this.TimeDuaration[i];
					int num2 = totalSecond / num;
					if (num2 > 0)
					{
						flag = true;
					}
					if (flag)
					{
						stringBuilder.Append(num2).Append(XStringDefineProxy.GetString(this.TimeName[i]));
					}
					totalSecond -= num2 * num;
					if (totalSecond == 0)
					{
						break;
					}
				}
			}
			return stringBuilder.ToString();
		}

		// Token: 0x06010E09 RID: 69129 RVA: 0x00445B9C File Offset: 0x00443D9C
		public string NumberFormat(int number)
		{
			bool flag = number < 0;
			number = Math.Abs(number);
			string text;
			if (number < 10000)
			{
				text = number.ToString();
			}
			else
			{
				number /= 10000;
				text = number.ToString() + "W";
			}
			if (flag)
			{
				text = "-" + text;
			}
			return text;
		}

		// Token: 0x06010E0A RID: 69130 RVA: 0x00445C04 File Offset: 0x00443E04
		public string NumberFormat(ulong number)
		{
			string result;
			if (number < XSingleton<XGlobalConfig>.singleton.MinSeparateNum)
			{
				result = number.ToString();
			}
			else
			{
				ulong[] numberSeparators = XSingleton<XGlobalConfig>.singleton.NumberSeparators;
				int num = -1;
				for (int i = 0; i < numberSeparators.Length; i++)
				{
					if (numberSeparators[i] > number)
					{
						break;
					}
					num = i;
				}
				if (num == -1)
				{
					result = number.ToString();
				}
				else
				{
					if (this.NumberSeparatorNames == null)
					{
						this.NumberSeparatorNames = new string[numberSeparators.Length];
						for (int j = 0; j < numberSeparators.Length; j++)
						{
							this.NumberSeparatorNames[j] = "NumberSeparator" + j.ToString();
						}
					}
					result = string.Format("{0}{1}", (number / numberSeparators[num]).ToString(), XStringDefineProxy.GetString(this.NumberSeparatorNames[num]));
				}
			}
			return result;
		}

		// Token: 0x06010E0B RID: 69131 RVA: 0x00445D00 File Offset: 0x00443F00
		public string NumberFormatBillion(ulong number)
		{
			double num = 100000000.0;
			string result;
			if (number > num)
			{
				double num2 = number / num;
				ulong num3 = (ulong)(num2 * 100.0);
				double num4 = num3 / 100.0;
				result = string.Format("{0}{1}", num4, XStringDefineProxy.GetString("NumberSeparator1"));
			}
			else
			{
				result = this.NumberFormat(number);
			}
			return result;
		}

		// Token: 0x06010E0C RID: 69132 RVA: 0x00445D74 File Offset: 0x00443F74
		public string GetBagExpandFullTips(BagType type)
		{
			string result;
			switch (type)
			{
			case BagType.EquipBag:
				result = XSingleton<XStringTable>.singleton.GetString("ExpandEquipBagFull");
				break;
			case BagType.EmblemBag:
				result = XSingleton<XStringTable>.singleton.GetString("ExpandEmbleBagFull");
				break;
			case BagType.ArtifactBag:
				result = XSingleton<XStringTable>.singleton.GetString("ExpandArtifactBagFull");
				break;
			case BagType.ItemBag:
				result = XSingleton<XStringTable>.singleton.GetString("ExpandItemBagFull");
				break;
			default:
				result = string.Empty;
				break;
			}
			return result;
		}

		// Token: 0x06010E0D RID: 69133 RVA: 0x00445DF0 File Offset: 0x00443FF0
		public Transform FindChild(Transform dlg, string childName)
		{
			string text = childName;
			if (childName.Contains("?profession?"))
			{
				int num = XFastEnumIntEqualityComparer<RoleType>.ToInt(XSingleton<XAttributeMgr>.singleton.XPlayerData.Profession) % 10;
				childName = childName.Replace("?profession?", num.ToString());
				text = text.Replace("?profession?", num.ToString());
			}
			if (childName.Contains("?profession1turn?"))
			{
				int num2 = XFastEnumIntEqualityComparer<RoleType>.ToInt(XSingleton<XAttributeMgr>.singleton.XPlayerData.Profession);
				if (num2 >= 10)
				{
					int num3 = num2 % 100 / 10 + num2 % 10 * 2 - 2;
					childName = childName.Replace("?profession1turn?", num3.ToString("d2"));
					text = text.Replace("?profession1turn?", num3.ToString("d2"));
				}
			}
			Transform result;
			if (childName.Contains("{"))
			{
				int num4 = childName.IndexOf("{");
				int num5 = childName.IndexOf("}");
				int num6 = int.Parse(childName.Substring(num4 + 1, num5 - num4 - 1)) - 1;
				string text2 = childName.Substring(0, num4 - 1);
				string text3 = childName.Substring(num5 + 1);
				Transform transform = dlg.Find(text2);
				if (transform == null)
				{
					result = null;
				}
				else
				{
					if (num6 >= transform.childCount)
					{
						result = null;
					}
					else
					{
						Transform transform2 = null;
						int num7 = -1;
						for (int i = 0; i < transform.childCount; i++)
						{
							transform2 = transform.GetChild(i);
							if (transform2.gameObject.activeSelf)
							{
								num7++;
							}
							if (num6 == num7)
							{
								break;
							}
						}
						if (text3 != "")
						{
							result = transform2.Find(text3.Substring(1));
						}
						else
						{
							result = transform2;
						}
					}
				}
			}
			else
			{
				Transform transform3 = dlg.Find(text);
				result = transform3;
			}
			return result;
		}

		// Token: 0x06010E0E RID: 69134 RVA: 0x00446000 File Offset: 0x00444200
		public int GetItemCount(int itemID)
		{
			return XSingleton<XGame>.singleton.Doc.XBagDoc.ItemBag.GetItemCount(itemID);
		}

		// Token: 0x06010E0F RID: 69135 RVA: 0x00446030 File Offset: 0x00444230
		public bool IsMaxBuyPowerCnt()
		{
			return this.IsMaxBuyCnt(ItemEnum.FATIGUE);
		}

		// Token: 0x06010E10 RID: 69136 RVA: 0x0044604C File Offset: 0x0044424C
		public bool IsMaxBuyCnt(ItemEnum type)
		{
			int level = (int)XSingleton<XAttributeMgr>.singleton.XPlayerData.Level;
			//zcg 
// 			XRechargeDocument specificDocument = XDocuments.GetSpecificDocument<XRechargeDocument>(XRechargeDocument.uuID);
// 			int vipLevel = (int)specificDocument.VipLevel;
// 			XPurchaseDocument specificDocument2 = XDocuments.GetSpecificDocument<XPurchaseDocument>(XPurchaseDocument.uuID);
// 			XPurchaseInfo purchaseInfo = specificDocument2.GetPurchaseInfo(level, vipLevel, type);
// 			return purchaseInfo.totalBuyNum <= purchaseInfo.curBuyNum;
			return false;
		}

		// Token: 0x06010E11 RID: 69137 RVA: 0x004460AC File Offset: 0x004442AC
		public bool CanEnterBattleScene(uint sceneID)
		{
			return this.CanEnterBattleScene(sceneID, 1);
		}

		// Token: 0x06010E12 RID: 69138 RVA: 0x004460C8 File Offset: 0x004442C8
		public bool CanEnterBattleScene(uint sceneID, int cnt)
		{
			SceneTable.RowData sceneData = XSingleton<XSceneMgr>.singleton.GetSceneData(sceneID);
			bool result;
			if (sceneData == null)
			{
				result = false;
			}
			else
			{
				bool flag2 = true;
				for (int i = 0; i < sceneData.FatigueCost.Count; i++)
				{
					int num = 0;
					if (sceneData.FatigueCost[i, 0] <= 50)
					{
						num = (int)XSingleton<XGame>.singleton.Doc.XBagDoc.GetVirtualItemCount((ItemEnum)sceneData.FatigueCost[i, 0]);
					}
					else
					{
						int num2 = -1;
						XSingleton<XGame>.singleton.Doc.XBagDoc.ItemBag.FindItem((ulong)((long)sceneData.FatigueCost[i, 0]), out num2);
						if (num2 >= 0)
						{
							XItem xitem = XSingleton<XGame>.singleton.Doc.XBagDoc.ItemBag[num2];
							num = xitem.itemCount;
						}
					}
					if (num < sceneData.FatigueCost[i, 1])
					{
						flag2 = false;
						break;
					}
				}
				result = flag2;
			}
			return result;
		}

		// Token: 0x06010E13 RID: 69139 RVA: 0x004461EA File Offset: 0x004443EA
		public void ShowLoginTip(string text)
		{
			DlgBase<XLoginTipView, XLoginTipBehaviour>.singleton.ShowTips(text);
		}

		// Token: 0x06010E14 RID: 69140 RVA: 0x004461F9 File Offset: 0x004443F9
		public void StopLoginTip()
		{
			DlgBase<XLoginTipView, XLoginTipBehaviour>.singleton.StopTips();
		}

		// Token: 0x06010E15 RID: 69141 RVA: 0x00446208 File Offset: 0x00444408
		public void ShowSystemTip(string text, string rgb = "fece00")
		{
			XSystemTipDocument specificDocument = XDocuments.GetSpecificDocument<XSystemTipDocument>(XSystemTipDocument.uuID);
			if (specificDocument != null)
			{
				specificDocument.ShowTip(text, rgb);
			}
		}

		// Token: 0x06010E16 RID: 69142 RVA: 0x00446234 File Offset: 0x00444434
		public void ShowSystemTip(int errcode, string rgb = "fece00")
		{
			XSystemTipDocument specificDocument = XDocuments.GetSpecificDocument<XSystemTipDocument>(XSystemTipDocument.uuID);
			if (specificDocument != null)
			{
				specificDocument.ShowTip(XStringDefineProxy.GetString((ErrorCode)errcode), rgb);
			}
		}

		// Token: 0x06010E17 RID: 69143 RVA: 0x00446264 File Offset: 0x00444464
		public void ShowSystemTip(ErrorCode errcode, string rgb = "fece00")
		{
			XSystemTipDocument specificDocument = XDocuments.GetSpecificDocument<XSystemTipDocument>(XSystemTipDocument.uuID);
			if (specificDocument != null)
			{
				specificDocument.ShowTip(this.ReplaceReturn(XStringDefineProxy.GetString(errcode)), rgb);
			}
		}

		// Token: 0x06010E18 RID: 69144 RVA: 0x00446299 File Offset: 0x00444499
		public void OnGetInvalidRequest(string name)
		{
			XSingleton<XDebug>.singleton.AddErrorLog("GetInvalidRequest:  ", name, null, null, null, null);
		}

		// Token: 0x06010E19 RID: 69145 RVA: 0x004462B4 File Offset: 0x004444B4
		public uint ShowSystemNoticeTip(string text)
		{
			//zcg XShowGetItemDocument specificDocument = XDocuments.GetSpecificDocument<XShowGetItemDocument>(XShowGetItemDocument.uuID);
			return 0;//zcg  specificDocument.AddTip(text);
		}

		// Token: 0x06010E1A RID: 69146 RVA: 0x004462D8 File Offset: 0x004444D8
		public void EditSystemNoticeTip(string text, uint id)
		{
			//zcg XShowGetItemDocument specificDocument = XDocuments.GetSpecificDocument<XShowGetItemDocument>(XShowGetItemDocument.uuID);
			//zcg specificDocument.EditTip(text, id);
		}

		// Token: 0x06010E1B RID: 69147 RVA: 0x004462FC File Offset: 0x004444FC
		public int GetRowCount(int count, int columnCount)
		{
			int result;
			if (count <= 0)
			{
				result = 0;
			}
			else
			{
				result = (count - 1) / columnCount + 1;
			}
			return result;
		}

		// Token: 0x06010E1C RID: 69148 RVA: 0x00446324 File Offset: 0x00444524
		public void SetVirtualItem(XNumberTween numTween, ulong num, bool bAnim = true, string postfix = "")
		{
			numTween.SetNumberWithTween(num, postfix, !bAnim, true);
			if (bAnim)
			{
				IXUITweenTool iconTween = numTween.IconTween;
				if (iconTween != null)
				{
					iconTween.PlayTween(true, -1f);
				}
			}
		}

		// Token: 0x06010E1D RID: 69149 RVA: 0x00446368 File Offset: 0x00444568
		public void ShowItemAccess(int itemid, AccessCallback callback = null)
		{
			ItemList.RowData itemConf = XBagDocument.GetItemConf(itemid);
			if (itemConf != null && itemConf.Access.Count > 0)
			{
				List<int> list = new List<int>();
				List<int> list2 = new List<int>();
				for (int i = 0; i < itemConf.Access.Count; i++)
				{
					list.Add(itemConf.Access[i, 0]);
					list2.Add(itemConf.Access[i, 1]);
				}
				//zcg DlgBase<ItemAccessDlg, ItemAccessDlgBehaviour>.singleton.ShowAccess(itemid, list, list2, callback);
			}
		}

		// Token: 0x06010E1E RID: 69150 RVA: 0x00446400 File Offset: 0x00444600
		public void OnItemClick(IXUISprite sp)
		{
			int itemID = (int)sp.ID;
			this.ShowTooltipDialog(itemID, sp, 0U);
		}

		// Token: 0x06010E1F RID: 69151 RVA: 0x00446420 File Offset: 0x00444620
		public void OnBindItemClick(IXUISprite sp)
		{
			int itemID = (int)sp.ID;
			XSingleton<TooltipParam>.singleton.bBinded = true;
			this.ShowTooltipDialog(itemID, sp, 0U);
		}

		// Token: 0x06010E20 RID: 69152 RVA: 0x0044644C File Offset: 0x0044464C
		public void SetUIDepthDelta(GameObject go, int delta)
		{
			IXUITool uiTool = XSingleton<XGameUI>.singleton.m_uiTool;
			uiTool.SetUIDepthDelta(go, delta);
		}

		// Token: 0x06010E21 RID: 69153 RVA: 0x00446470 File Offset: 0x00444670
		public void UpdateWifi(IXUIButton btn, IXUISprite spr)
		{
			if (this.wifi_green == 0U || this.wifi_yellow == 0U)
			{
				this.wifi_green = uint.Parse(XSingleton<XGlobalConfig>.singleton.GetValue("WIFI_GREEN"));
				this.wifi_yellow = uint.Parse(XSingleton<XGlobalConfig>.singleton.GetValue("WIFI_YELO"));
			}
			long delay = XSingleton<XServerTimeMgr>.singleton.GetDelay();
			if (delay <= (long)((ulong)this.wifi_green))
			{
				this.wifiBtn = "xh_2";
				if (btn != null)
				{
					btn.SetAlpha(1f);
				}
				if (spr != null)
				{
					spr.SetAlpha(1f);
				}
			}
			else
			{
				if (delay <= (long)((ulong)this.wifi_yellow))
				{
					this.wifiBtn = "xh_1";
					if (btn != null)
					{
						btn.SetAlpha(1f);
					}
					if (spr != null)
					{
						spr.SetAlpha(1f);
					}
				}
				else
				{
					this.wifiBtn = "xh_0";
					if (btn != null)
					{
						btn.SetAlpha(1f);
					}
					if (spr != null)
					{
						spr.SetAlpha(1f);
					}
				}
			}
			if (btn != null)
			{
				btn.SetSprites(this.wifiBtn, this.wifiBtn, this.wifiBtn);
			}
			if (spr != null)
			{
				spr.SetSprite(this.wifiBtn);
			}
			if (delay >= XServerTimeMgr.SyncTimeOut)
			{
				if (this.wifi_cur >= 1f && this.wifi_forward)
				{
					this.wifi_forward = false;
				}
				if (this.wifi_cur <= 0f && !this.wifi_forward)
				{
					this.wifi_forward = true;
				}
				this.wifi_cur = (this.wifi_forward ? (Time.time % this.wifi_duration / this.wifi_duration) : (1f - Time.time % this.wifi_duration / this.wifi_duration));
				if (btn != null)
				{
					btn.SetAlpha(this.wifi_cur);
				}
				if (spr != null)
				{
					spr.SetAlpha(this.wifi_cur);
				}
			}
		}

		// Token: 0x06010E22 RID: 69154 RVA: 0x004466B0 File Offset: 0x004448B0
		public bool IsWeakNetwork()
		{
			uint num = uint.Parse(XSingleton<XGlobalConfig>.singleton.GetValue("WIFI_GREEN"));
			uint num2 = uint.Parse(XSingleton<XGlobalConfig>.singleton.GetValue("WIFI_YELO"));
			long delay = XSingleton<XServerTimeMgr>.singleton.GetDelay();
			//bool flag = delay <= (long)((ulong)num) || delay <= (long)((ulong)num2);
			return /*!flag*/delay > (long)((ulong)num) && delay > (long)((ulong)num2);
		}

		// Token: 0x06010E23 RID: 69155 RVA: 0x00446714 File Offset: 0x00444914
		public void RefreshPing(IXUILabel _time, IXUISlider _slider, IXUILabel _free)
		{
			string batteryLevel = XSingleton<XUpdater.XUpdater>.singleton.XPlatform.GetBatteryLevel();
			string text = DateTime.Now.ToString("HH:mm");
			if (_time != null)
			{
				_time.SetText(text);
			}
			int num = 100;
			int.TryParse(batteryLevel, out num);
			if (_slider != null)
			{
				_slider.Value = (float)num / 100f;
			}
			if (_free != null)
			{
				_free.Alpha = (float)(XSingleton<XLoginDocument>.singleton.freeflow ? 1 : 0);
			}
		}

		// Token: 0x06010E24 RID: 69156 RVA: 0x004467A0 File Offset: 0x004449A0
		public bool IsSystemExpress(string txt)
		{
			byte[] bytes = Encoding.UTF8.GetBytes(txt);
			//bool flag = bytes == null || bytes.Length <= 1;
			return /*!flag*/(bytes != null && bytes.Length > 1) && (bytes[0] == 240);
		}

		// Token: 0x06010E25 RID: 69157 RVA: 0x004467E4 File Offset: 0x004449E4
		public string StripInvalidUnicodeCharacters(string str)
		{
			return str;
		}

		// Token: 0x06010E26 RID: 69158 RVA: 0x004467F8 File Offset: 0x004449F8
		public void ShowAfterLoginAnnouncement(PlatNotice announcement)
		{
			if (announcement != null)
			{
				if (announcement.isopen)
				{
					DlgBase<XAnnouncementView, XAnnouncementBehaviour>.singleton.ShowAnnouncement(announcement.content);
				}
			}
		}

		// Token: 0x06010E27 RID: 69159 RVA: 0x0044682C File Offset: 0x00444A2C
		public void ShowPatface()
		{
			//zcg 
			return;
			//zcg
// 			DlgBase<XPatfaceView, XPatfaceBehaviour>.singleton.bShow = true;
// 			RpcC2M_FetchPlatNotice rpcC2M_FetchPlatNotice = new RpcC2M_FetchPlatNotice();
// 			rpcC2M_FetchPlatNotice.oArg.type = XSingleton<XClientNetwork>.singleton.AccountType;
// 			RuntimePlatform platform = Application.platform;
// 			if (platform == RuntimePlatform.IPhonePlayer)
//             {
//                 rpcC2M_FetchPlatNotice.oArg.platid = PlatType.PLAT_IOS;
//             }
// 			else if(platform == RuntimePlatform.Android)
//             {
//                 rpcC2M_FetchPlatNotice.oArg.platid = PlatType.PLAT_ANDROID;
//             }
// 
//             XSingleton<XClientNetwork>.singleton.Send(rpcC2M_FetchPlatNotice);
		}

		// Token: 0x06010E28 RID: 69160 RVA: 0x004468A0 File Offset: 0x00444AA0
		public string GlobalConfigGetValue(string cfgName)
		{
			return XSingleton<XGlobalConfig>.singleton.GetValue(cfgName);
		}

		// Token: 0x06010E29 RID: 69161 RVA: 0x004468C0 File Offset: 0x00444AC0
		public Color StringToColor(string str)
		{
			Color result;
			if (string.IsNullOrEmpty(str))
			{
				result = Color.white;
			}
			else
			{
				int num = int.Parse(str, NumberStyles.AllowHexSpecifier);
				float num2 = (float)(num / 65536);
				float num3 = (float)(num / 256 % 256);
				float num4 = (float)(num % 256);
				result = new Color(num2 / 255f, num3 / 255f, num4 / 255f);
			}
			return result;
		}

		// Token: 0x06010E2A RID: 69162 RVA: 0x00446930 File Offset: 0x00444B30
		public string GetChatDesignation(uint desID, string specDesi, string name = "")
		{
			//zcg 
			return name;
// 			XDesignationDocument specificDocument = XDocuments.GetSpecificDocument<XDesignationDocument>(XDesignationDocument.uuID);
// 			DesignationTable.RowData byID = specificDocument._DesignationTable.GetByID((int)desID);
// 			string result;
// 			if (byID == null || !byID.ShowInChat)
// 			{
// 				result = name;
// 			}
// 			else
// 			{
// 				if (byID.Effect != "")
// 				{
// 					result = string.Format("{0}{1}", XLabelSymbolHelper.FormatDesignation(byID.Atlas, byID.Effect, 16), name);
// 				}
// 				else
// 				{
// 					if (name != "")
// 					{
// 						name = string.Format(" {0}", name);
// 					}
// 					if (byID.Special)
// 					{
// 						result = string.Format("{0}{1}[-]{2}", byID.Color, specDesi, name);
// 					}
// 					else
// 					{
// 						result = string.Format("{0}{1}[-]{2}", byID.Color, byID.Designation, name);
// 					}
// 				}
// 			}
// 			return result;
		}

		// Token: 0x06010E2B RID: 69163 RVA: 0x00446A04 File Offset: 0x00444C04
		public string SetChatCoverDesignation(string name, uint desID, bool justPicDesc = false)
		{
			//zcg
			string text = string.Format("{0}{1}", XSingleton<XGlobalConfig>.singleton.GetValue("XUILabelSymbolNameColor"), name);


// 			XDesignationDocument specificDocument = XDocuments.GetSpecificDocument<XDesignationDocument>(XDesignationDocument.uuID);
// 			DesignationTable.RowData byID = specificDocument._DesignationTable.GetByID((int)desID);
// 			string text = string.Format("{0}{1}", XSingleton<XGlobalConfig>.singleton.GetValue("XUILabelSymbolNameColor"), name);
// 			if (byID == null || byID.Effect != "")
// 			{
// 				if (byID != null)
// 				{
// 					text = string.Format("{0}{1}", XLabelSymbolHelper.FormatDesignation(byID.Atlas, byID.Effect, 16), text);
// 				}
// 			}
// 			else
// 			{
// 				if (!justPicDesc)
// 				{
// 					text = string.Format("{0}{1} {2}", XSingleton<XGlobalConfig>.singleton.GetValue("XUILabelSymbolDesignationColor"), byID.Designation, text);
// 				}
// 			}
			return text;
		}

		// Token: 0x06010E2C RID: 69164 RVA: 0x00446AC0 File Offset: 0x00444CC0
		public Color ParseColor(string text, int offset)
		{
			int num = this.HexToDecimal(text[offset]) << 4 | this.HexToDecimal(text[offset + 1]);
			int num2 = this.HexToDecimal(text[offset + 2]) << 4 | this.HexToDecimal(text[offset + 3]);
			int num3 = this.HexToDecimal(text[offset + 4]) << 4 | this.HexToDecimal(text[offset + 5]);
			float num4 = 0.003921569f;
			return new Color(num4 * (float)num, num4 * (float)num2, num4 * (float)num3);
		}

		// Token: 0x06010E2D RID: 69165 RVA: 0x00446B50 File Offset: 0x00444D50
		public int HexToDecimal(char ch)
		{
			switch (ch)
			{
			case '0':
				return 0;
			case '1':
				return 1;
			case '2':
				return 2;
			case '3':
				return 3;
			case '4':
				return 4;
			case '5':
				return 5;
			case '6':
				return 6;
			case '7':
				return 7;
			case '8':
				return 8;
			case '9':
				return 9;
			case ':':
			case ';':
			case '<':
			case '=':
			case '>':
			case '?':
			case '@':
				goto IL_D4;
			case 'A':
				break;
			case 'B':
				goto IL_BB;
			case 'C':
				goto IL_C0;
			case 'D':
				goto IL_C5;
			case 'E':
				goto IL_CA;
			case 'F':
				goto IL_CF;
			default:
				switch (ch)
				{
				case 'a':
					break;
				case 'b':
					goto IL_BB;
				case 'c':
					goto IL_C0;
				case 'd':
					goto IL_C5;
				case 'e':
					goto IL_CA;
				case 'f':
					goto IL_CF;
				default:
					goto IL_D4;
				}
				break;
			}
			return 10;
			IL_BB:
			return 11;
			IL_C0:
			return 12;
			IL_C5:
			return 13;
			IL_CA:
			return 14;
			IL_CF:
			return 15;
			IL_D4:
			return 15;
		}

		// Token: 0x06010E2E RID: 69166 RVA: 0x00446C38 File Offset: 0x00444E38
		public void ShowFatigueSureDlg(ButtonClickEventHandler handler)
		{
			string label = string.Format(XStringDefineProxy.GetString("FATIGUEOVERFLOWTIPS"), XSingleton<XGlobalConfig>.singleton.GetValue("MaxFatigue"));
			string @string = XStringDefineProxy.GetString("COMMON_OK");
			string string2 = XStringDefineProxy.GetString("COMMON_CANCEL");
			XSingleton<UiUtility>.singleton.ShowModalDialog(label, @string, string2, handler, 100);
		}

		// Token: 0x06010E2F RID: 69167 RVA: 0x00446C8C File Offset: 0x00444E8C
		public void ShowRank(IXUISprite sp, IXUILabel label, int rank)
		{
			if (1 <= rank && rank <= 3)
			{
				sp.gameObject.SetActive(true);
				label.gameObject.SetActive(false);
				if (rank == 1)
				{
					sp.SetSprite("N1");
				}
				if (rank == 2)
				{
					sp.SetSprite("N2");
				}
				if (rank == 3)
				{
					sp.SetSprite("N3");
				}
			}
			else
			{
				sp.gameObject.SetActive(false);
				label.gameObject.SetActive(true);
				if (rank <= 0)
				{
					label.SetText(XStringDefineProxy.GetString("NoRank"));
				}
				else
				{
					label.SetText(rank.ToString());
				}
			}
		}

		// Token: 0x06010E30 RID: 69168 RVA: 0x00446D50 File Offset: 0x00444F50
		public void DestroyTextureInActivePool(XUIPool pool, string path)
		{
			List<GameObject> list = ListPool<GameObject>.Get();
			pool.GetActiveList(list);
			for (int i = 0; i < list.Count; i++)
			{
				GameObject gameObject = list[i];
				IXUITexture ixuitexture = gameObject.transform.Find("path").GetComponent("XUITexture") as IXUITexture;
				if (ixuitexture != null)
				{
					ixuitexture.SetTexturePath("");
				}
			}
			ListPool<GameObject>.Release(list);
		}

		// Token: 0x06010E31 RID: 69169 RVA: 0x00446DCC File Offset: 0x00444FCC
		public void SetMiniMapOpponentStatus(bool hide)
		{
			//zcg BattleIndicateHandler.SetMiniMapOpponentStatus(hide);
		}

		// Token: 0x06010E32 RID: 69170 RVA: 0x00446DD8 File Offset: 0x00444FD8
		public string GetItemTypeStr(ItemType type)
		{
			return this.GetItemTypeStr(XFastEnumIntEqualityComparer<ItemType>.ToInt(type));
		}

		// Token: 0x06010E33 RID: 69171 RVA: 0x00446DF8 File Offset: 0x00444FF8
		public string GetItemTypeStr(int type)
		{
			return XStringDefineProxy.GetString(XSingleton<XCommon>.singleton.StringCombine("ItemType", type.ToString()));
		}

		// Token: 0x06010E34 RID: 69172 RVA: 0x00446E28 File Offset: 0x00445028
		public void OnPayCallback(string msg)
		{
			//zcg XRechargeDocument specificDocument = XDocuments.GetSpecificDocument<XRechargeDocument>(XRechargeDocument.uuID);
			//zcg specificDocument.OnPayCallback(msg);
		}

		// Token: 0x06010E35 RID: 69173 RVA: 0x00446E4C File Offset: 0x0044504C
		public void SDKPandoraBuyGoods(string json)
		{
			//zcg XRechargeDocument specificDocument = XDocuments.GetSpecificDocument<XRechargeDocument>(XRechargeDocument.uuID);
			//zcg specificDocument.SDKPandoraBuyGoods(json);
		}

		// Token: 0x06010E36 RID: 69174 RVA: 0x00446E70 File Offset: 0x00445070
		public void OnQQVipPayCallback(string msg)
		{
			//zcg XPlatformAbilityDocument specificDocument = XDocuments.GetSpecificDocument<XPlatformAbilityDocument>(XPlatformAbilityDocument.uuID);
			//zcg specificDocument.OnQQVipPayCallback(msg);
		}

		// Token: 0x06010E37 RID: 69175 RVA: 0x00446E94 File Offset: 0x00445094
		public void OnGameCenterWakeUp(int type)
		{
			XSingleton<XDebug>.singleton.AddLog("[OnGameCenterWakeUp] StartUpType = " + type, null, null, null, null, null, XDebugColor.XDebug_None);
			if ((type == 2 && XSingleton<XLoginDocument>.singleton.Channel == XAuthorizationChannel.XAuthorization_QQ) || (type == 3 && XSingleton<XLoginDocument>.singleton.Channel == XAuthorizationChannel.XAuthorization_WeChat))
			{
				XSingleton<XDebug>.singleton.AddLog("[OnGameCenterWakeUp] PtcC2N_UpdateStartUpTypeNtf type = " + type, null, null, null, null, null, XDebugColor.XDebug_None);
				PtcC2N_UpdateStartUpTypeNtf ptcC2N_UpdateStartUpTypeNtf = new PtcC2N_UpdateStartUpTypeNtf();
				ptcC2N_UpdateStartUpTypeNtf.Data.type = (StartUpType)type;
				XSingleton<XClientNetwork>.singleton.Send(ptcC2N_UpdateStartUpTypeNtf);
				DlgBase<XMainInterface, XMainInterfaceBehaviour>.singleton.RefreshGameCenterInfo();
			}
		}

		// Token: 0x06010E38 RID: 69176 RVA: 0x00446F40 File Offset: 0x00445140
		public void OnGetPlatFriendsInfo()
		{
			XSingleton<XDebug>.singleton.AddLog("[UiUtility] OnGetPlatFriendsInfo", null, null, null, null, null, XDebugColor.XDebug_None);
			//zcg XFriendsDocument.Doc.SyncPlatFriendsInfo();
			XSingleton<XLoginDocument>.singleton.SetFriendServerIcon();
			XSingleton<XUpdater.XUpdater>.singleton.XPlatform.SendGameExData("QuerySelf", "");
			if (XSingleton<PDatabase>.singleton.playerInfo != null)
			{
				string pictureLarge = XSingleton<PDatabase>.singleton.playerInfo.data.pictureLarge;
				XSingleton<XUICacheImage>.singleton.SetMainIcon(pictureLarge);
			}
		}

		// Token: 0x06010E39 RID: 69177 RVA: 0x00446FC8 File Offset: 0x004451C8
		public void SerialHandle3DTouch(string msg)
		{
			//zcg XSingleton<X3DTouchMgr>.singleton.OnProcess3DTouch(msg);
		}

		// Token: 0x06010E3A RID: 69178 RVA: 0x000FEEFC File Offset: 0x000FD0FC
		public void SerialHandleScreenLock(string msg)
		{
		}

		// Token: 0x06010E3B RID: 69179 RVA: 0x00446FD8 File Offset: 0x004451D8
		public void OnPayMarketingInfo(List<PayMarketingInfo> listInfo)
		{
			//zcg XRechargeDocument specificDocument = XDocuments.GetSpecificDocument<XRechargeDocument>(XRechargeDocument.uuID);
			//zcg specificDocument.OnGetPayMarketingInfo(listInfo);
		}

		// Token: 0x06010E3C RID: 69180 RVA: 0x00446FFC File Offset: 0x004451FC
		public void ShowSettingNumberDialog(uint itemID, string title, uint min, uint max, uint step, ModalSettingNumberDlg.GetInputNumber handler, int depth = 50)
		{
			DlgBase<ModalSettingNumberDlg, ModalSettingNumberDlgBehaviour>.singleton.Load();
			DlgBase<ModalSettingNumberDlg, ModalSettingNumberDlgBehaviour>.singleton.MaxNumber = max;
			DlgBase<ModalSettingNumberDlg, ModalSettingNumberDlgBehaviour>.singleton.MinNumber = min;
			DlgBase<ModalSettingNumberDlg, ModalSettingNumberDlgBehaviour>.singleton.Title = title;
			DlgBase<ModalSettingNumberDlg, ModalSettingNumberDlgBehaviour>.singleton.step = step;
			DlgBase<ModalSettingNumberDlg, ModalSettingNumberDlgBehaviour>.singleton.ItemID = itemID;
			DlgBase<ModalSettingNumberDlg, ModalSettingNumberDlgBehaviour>.singleton.SetModalInfo(handler);
			DlgBase<ModalSettingNumberDlg, ModalSettingNumberDlgBehaviour>.singleton.SetVisible(true, true);
		}

		// Token: 0x06010E3D RID: 69181 RVA: 0x00447068 File Offset: 0x00445268
		public string GetPartitionId()
		{
			return XSingleton<XClientNetwork>.singleton.ServerID.ToString();
		}

		// Token: 0x06010E3E RID: 69182 RVA: 0x0044708C File Offset: 0x0044528C
		public string GetRoleId()
		{
			string result;
			if (XSingleton<XEntityMgr>.singleton.Player != null)
			{
				result = XSingleton<XEntityMgr>.singleton.Player.Attributes.RoleID.ToString();
			}
			else
			{
				result = "0";
			}
			return result;
		}

		// Token: 0x06010E3F RID: 69183 RVA: 0x004470D4 File Offset: 0x004452D4
		public void OnReplayStart()
		{
			if (!DlgBase<ReplaykitDlg, ReplayBehaviour>.singleton.IsVisible())
			{
				DlgBase<ReplaykitDlg, ReplayBehaviour>.singleton.isPlaying = true;
				DlgBase<ReplaykitDlg, ReplayBehaviour>.singleton.Show(true);
			}
		}

		// Token: 0x06010E40 RID: 69184 RVA: 0x0044710C File Offset: 0x0044530C
		public void OnSetBg(bool on)
		{
			//zcg XSingleton<XChatIFlyMgr>.singleton.SetBackMusicOn(on);
		}

		// Token: 0x06010E41 RID: 69185 RVA: 0x0044711C File Offset: 0x0044531C
		public void OpenHtmlUrl(string key)
		{
			Dictionary<string, string> dictionary = new Dictionary<string, string>();
			dictionary["url"] = XSingleton<XGlobalConfig>.singleton.GetValue(key);
			dictionary["screendir"] = "SENSOR";
			XSingleton<XUpdater.XUpdater>.singleton.XPlatform.SendExtDara("open_url", Json.Serialize(dictionary));
		}

		// Token: 0x06010E42 RID: 69186 RVA: 0x00447174 File Offset: 0x00445374
		public void CloseSysAndNoticeServer(uint sysID)
		{
			PtcC2G_CloseHintNtf ptcC2G_CloseHintNtf = new PtcC2G_CloseHintNtf();
			ptcC2G_CloseHintNtf.Data.systemid = sysID;
			XSingleton<XClientNetwork>.singleton.Send(ptcC2G_CloseHintNtf);
			XSingleton<XGameSysMgr>.singleton.SetSysRedPointState((XSysDefine)sysID, false);
			XSingleton<XGameSysMgr>.singleton.RecalculateRedPointState((XSysDefine)sysID, true);
		}

		// Token: 0x06010E43 RID: 69187 RVA: 0x004471BC File Offset: 0x004453BC
		public void OpenUrl(string url, bool landscape)
		{
			Dictionary<string, string> dictionary = new Dictionary<string, string>();
			dictionary["url"] = url;
			dictionary["screendir"] = (landscape ? "LANDSCAPE" : "SENSOR");
			XSingleton<XUpdater.XUpdater>.singleton.XPlatform.SendExtDara("open_url", Json.Serialize(dictionary));
		}

		// Token: 0x06010E44 RID: 69188 RVA: 0x00447214 File Offset: 0x00445414
		public void Shuffle<T>(ref List<T> list)
		{
			for (int i = list.Count - 1; i > 0; i--)
			{
				int num = XSingleton<XCommon>.singleton.RandomInt(0, i + 1);
				if (num != i)
				{
					T value = list[i];
					list[i] = list[num];
					list[num] = value;
				}
			}
		}

		// Token: 0x06010E45 RID: 69189 RVA: 0x0044727E File Offset: 0x0044547E
		public void OnSetWebViewMenu(int menutype)
		{
			//zcg DlgBase<WebView, WebViewBehaviour>.singleton.OnSetWebViewMenu(menutype);
		}

		// Token: 0x06010E46 RID: 69190 RVA: 0x0044728D File Offset: 0x0044548D
		public void OnWebViewBackGame(int backtype)
		{
			//zcg DlgBase<WebView, WebViewBehaviour>.singleton.OnWebViewBackGame(backtype);
		}

		// Token: 0x06010E47 RID: 69191 RVA: 0x0044729C File Offset: 0x0044549C
		public void OnWebViewRefershRefPoint(string jsonstr)
		{
			//zcg DlgBase<WebView, WebViewBehaviour>.singleton.OnWebViewRefershRefPoint(jsonstr);
		}

		// Token: 0x06010E48 RID: 69192 RVA: 0x004472AB File Offset: 0x004454AB
		public void OnWebViewSetheaderInfo(string jsonstr)
		{
			//zcg DlgBase<WebView, WebViewBehaviour>.singleton.OnWebViewSetheaderInfo(jsonstr);
		}

		// Token: 0x06010E49 RID: 69193 RVA: 0x004472BA File Offset: 0x004454BA
		public void OnWebViewCloseLoading(int show)
		{
			//zcg DlgBase<WebView, WebViewBehaviour>.singleton.OnWebViewCloseLoading(show);
		}

		// Token: 0x06010E4A RID: 69194 RVA: 0x004472C9 File Offset: 0x004454C9
		public void OnWebViewShowReconnect(int show)
		{
			//zcg DlgBase<WebView, WebViewBehaviour>.singleton.OnWebViewShowReconnect(show);
		}

		// Token: 0x06010E4B RID: 69195 RVA: 0x004472D8 File Offset: 0x004454D8
		public void OnWebViewClose()
		{
			//zcg 
// 			bool flag = DlgBase<WebView, WebViewBehaviour>.singleton.IsLoaded();
// 			if (flag)
// 			{
// 				DlgBase<WebView, WebViewBehaviour>.singleton.SetVisible(false, true);
// 			}
		}

		// Token: 0x06010E4C RID: 69196 RVA: 0x00447304 File Offset: 0x00445504
		public void OnWebViewLiveTab()
		{
			//zcg 
// 			bool flag = DlgBase<WebView, WebViewBehaviour>.singleton.IsLoaded();
// 			if (flag)
// 			{
// 				DlgBase<WebView, WebViewBehaviour>.singleton.OnTabLive();
// 			}
		}

		// Token: 0x06010E4D RID: 69197 RVA: 0x0044732C File Offset: 0x0044552C
		public void ShowPandoraPopView(bool bShow)
		{
			if (bShow && XSingleton<XScene>.singleton.GameCamera != null && XSingleton<XScene>.singleton.GameCamera.UnityCamera != null && !XSingleton<XScene>.singleton.GameCamera.UnityCamera.enabled)
			{
				XSingleton<XScene>.singleton.GameCamera.UnityCamera.enabled = true;
			}
			XSingleton<XDebug>.singleton.AddGreenLog("Pandora UiUtiliy ShowPandoraPopView bShow = " + bShow.ToString(), null, null, null, null, null);
			DlgBase<XPandoraSDKPopView, XPandoraSDKPopViewBehaviour>.singleton.SetVisible(bShow, true);
		}

		// Token: 0x06010E4E RID: 69198 RVA: 0x004473C4 File Offset: 0x004455C4
		public void OnWXGroupResult(string apiId, string result, int error, WXGroupCallBackType type)
		{
			if (type != WXGroupCallBackType.DragonGuild)
			{
				if (type == WXGroupCallBackType.Guild)
				{
					//zcg DlgBase<XGuildHallView, XGuildHallBehaviour>.singleton.GuildGroupResult(apiId, result, error);
				}
			}
			else
			{
				XSingleton<PDatabase>.singleton.wxGroupCallbackType = WXGroupCallBackType.Guild;
				//zcg XDragonGuildDocument.Doc.View.DragonGuildGroupResult(apiId, result, error);
			}
		}

		// Token: 0x06010E4F RID: 69199 RVA: 0x00447410 File Offset: 0x00445610
		public void RefreshWXGroupBtn(WXGroupCallBackType type)
		{
			if (type != WXGroupCallBackType.DragonGuild)
			{
				if (type == WXGroupCallBackType.Guild)
				{
					//zcg DlgBase<XGuildHallView, XGuildHallBehaviour>.singleton.RefreshWXGroupBtn();
				}
			}
			else
			{
				XSingleton<PDatabase>.singleton.wxGroupCallbackType = WXGroupCallBackType.Guild;
				//zcg XDragonGuildDocument.Doc.RefreshWXGroupBtn();
			}
		}

		// Token: 0x06010E50 RID: 69200 RVA: 0x00447450 File Offset: 0x00445650
		public void NoticeShareResult(string result, ShareCallBackType type)
		{
			XSingleton<XDebug>.singleton.AddLog("NoticeShareResult   " + result + ", type = " + type.ToString(), null, null, null, null, null, XDebugColor.XDebug_None);
			if (type != ShareCallBackType.AddQQFriend)
			{
				this.ShowSystemTip((result == "Success") ? XSingleton<XStringTable>.singleton.GetString("GUILD_GROUP_SHARE_SUC") : XSingleton<XStringTable>.singleton.GetString("GUILD_GROUP_SHARE_FAIL"), "fece00");
			}
			else
			{
				this.ShowSystemTip((result == "Success") ? XSingleton<XStringTable>.singleton.GetString("FRIEND_ADD_QQ_FRIEND_SEND_SUC") : XSingleton<XStringTable>.singleton.GetString("FRIEND_ADD_QQ_FRIEND_SEND_FAIL"), "fece00");
			}
			switch (type)
			{
			case ShareCallBackType.Normal:
					//zcg XSingleton<XPandoraSDKDocument>.singleton.NoticePandoraShareResult(result);
					break;
			case ShareCallBackType.GloryPic:
			{
						//zcg 
// 				XAchievementDocument specificDocument = XDocuments.GetSpecificDocument<XAchievementDocument>(XAchievementDocument.uuID);
// 				bool flag2 = result.Contains("Success");
// 				if (flag2)
// 				{
// 					specificDocument.SendWeekShareSuccess(0U);
// 				}
				break;
			}
			case ShareCallBackType.DungeonShare:
			{
				XSingleton<XDebug>.singleton.AddLog("DungeonShare   " + result, null, null, null, null, null, XDebugColor.XDebug_None);
						//zcg 
// 				XAchievementDocument specificDocument2 = XDocuments.GetSpecificDocument<XAchievementDocument>(XAchievementDocument.uuID);
// 				bool flag3 = result.Contains("Success");
// 				if (flag3)
// 				{
// 					specificDocument2.SendWeekShareSuccess(specificDocument2.FirstPassSceneID);
// 				}
// 				specificDocument2.FirstPassSceneID = 0U;
// 				bool flag4 = DlgBase<DungeonShareView, DungeonShareBehavior>.singleton.IsVisible();
// 				if (flag4)
// 				{
// 					DlgBase<DungeonShareView, DungeonShareBehavior>.singleton.SetVisibleWithAnimation(false, null);
// 				}
				break;
			}
			case ShareCallBackType.WeekShare:
			{
						//zcg 
// 				XAchievementDocument specificDocument3 = XDocuments.GetSpecificDocument<XAchievementDocument>(XAchievementDocument.uuID);
// 				bool flag5 = result.Contains("Success");
// 				if (flag5)
// 				{
// 					specificDocument3.SendWeekShareSuccess(0U);
// 				}
				break;
			}
			}
		}

		// Token: 0x06010E51 RID: 69201 RVA: 0x0044760C File Offset: 0x0044580C
		public bool CheckWXInstalled()
		{
			bool result;
			if (!XSingleton<XUpdater.XUpdater>.singleton.XPlatform.CheckStatus("Weixin_Installed", ""))
			{
				XSingleton<UiUtility>.singleton.ShowSystemTip(XSingleton<XStringTable>.singleton.GetString("ERR_WECHAT_NOT_INSTALLED"), "fece00");
				result = false;
			}
			else
			{
				result = true;
			}
			return result;
		}

		// Token: 0x06010E52 RID: 69202 RVA: 0x00447668 File Offset: 0x00445868
		public bool CheckQQInstalled()
		{
			bool result;
			if (!XSingleton<XUpdater.XUpdater>.singleton.XPlatform.CheckStatus("QQ_Installed", ""))
			{
				XSingleton<UiUtility>.singleton.ShowSystemTip(XSingleton<XStringTable>.singleton.GetString("ERR_QQ_NOT_INSTALLED"), "fece00");
				result = false;
			}
			else
			{
				result = true;
			}
			return result;
		}

		// Token: 0x06010E53 RID: 69203 RVA: 0x004476C4 File Offset: 0x004458C4
		public void UpdatePandoraSDKRedPoint(int pandoraSysID, bool showRedPoint, string module)
		{
			//zcg 
// 			if (showRedPoint)
// 			{
// 				bool flag = XSingleton<XPandoraSDKDocument>.singleton.IsActivityTabShow(pandoraSysID);
// 				if (flag)
// 				{
// 					XSingleton<XGameSysMgr>.singleton.ForceUpdateSysRedPointImmediately(pandoraSysID, showRedPoint);
// 				}
// 			}
// 			else
// 			{
// 				XSingleton<XGameSysMgr>.singleton.ForceUpdateSysRedPointImmediately(pandoraSysID, showRedPoint);
// 			}
// 			bool flag2 = module == "action";
// 			if (flag2)
// 			{
// 				//zcg XOperatingActivityDocument specificDocument = XDocuments.GetSpecificDocument<XOperatingActivityDocument>(XOperatingActivityDocument.uuID);
// 				//zcg specificDocument.RefreshRedPoints();
// 			}
// 			else
// 			{
// 				bool flag3 = module == "callBack";
// 				if (flag3)
// 				{
// 					ILuaEngine xluaEngine = XSingleton<XUpdater.XUpdater>.singleton.XLuaEngine;
// 					xluaEngine.hotfixMgr.CallLuaFunc("LuaBackflowDocument", "RefreshPandoraTabRedpoint");
// 				}
// 			}
		}

		// Token: 0x06010E54 RID: 69204 RVA: 0x00447764 File Offset: 0x00445964
		public void AttachPandoraSDKRedPoint(int sysID, string module)
		{
			if (module == "action")
			{
				//zcg XOperatingActivityDocument specificDocument = XDocuments.GetSpecificDocument<XOperatingActivityDocument>(XOperatingActivityDocument.uuID);
				//zcg specificDocument.AttachPandoraRedPoint(sysID);
			}
			else
			{
				if (module == "callBack")
				{
					//zcg XBackFlowDocument specificDocument2 = XDocuments.GetSpecificDocument<XBackFlowDocument>(XBackFlowDocument.uuID);
					//zcg specificDocument2.AttachPandoraRedPoint(sysID);
				}
			}
		}

		// Token: 0x06010E55 RID: 69205 RVA: 0x004477BC File Offset: 0x004459BC
		public void ResetAllPopPLParent()
		{
			//zcg XSingleton<XPandoraSDKDocument>.singleton.ResetAllPopPLParent();
		}

		// Token: 0x06010E56 RID: 69206 RVA: 0x004477CC File Offset: 0x004459CC
		public void BillBoardCommonSetSpriteStr(params string[] strs)
		{
			this.ComSpriteStr.Clear();
			for (int i = 0; i < strs.Length; i++)
			{
				this.ComSpriteStr.Add(strs[i]);
			}
		}

		// Token: 0x06010E57 RID: 69207 RVA: 0x00447808 File Offset: 0x00445A08
		public double GetMachineTime()
		{
			return (double)(DateTime.Now.Ticks / 10000000L);
		}

		// Token: 0x06010E58 RID: 69208 RVA: 0x00447830 File Offset: 0x00445A30
		public int GetMachineTimeFrom1970()
		{
			return (int)((DateTime.Now - new DateTime(1970, 1, 1)).Ticks / 10000000L);
		}

		// Token: 0x06010E59 RID: 69209 RVA: 0x00447868 File Offset: 0x00445A68
		public string Decrypt(string CipherText)
		{
			byte[] bytes = Encoding.BigEndianUnicode.GetBytes(CipherText);
			int num = bytes.Length;
			byte[] array = new byte[num / 2];
			for (int i = 0; i < num; i += 4)
			{
				byte b = bytes[i + 1];
				byte b2 = bytes[i + 3];
				int num2 = (int)(b & 15) << 4;
				int num3 = (int)(b & 240);
				int num4 = (int)(b2 & 15);
				int num5 = (b2 & 240) >> 4;
				array[i / 2] = Convert.ToByte(num2 | num5);
				array[i / 2 + 1] = Convert.ToByte(num3 | num4);
			}
			return Encoding.BigEndianUnicode.GetString(array, 0, array.Length);
		}

		// Token: 0x06010E5A RID: 69210 RVA: 0x0044790C File Offset: 0x00445B0C
		public bool CheckPlatfomStatus()
		{
			if (XSingleton<XLoginDocument>.singleton.Channel == XAuthorizationChannel.XAuthorization_QQ)
			{
				if (!this.CheckQQInstalled())
				{
					return false;
				}
			}
			if (XSingleton<XLoginDocument>.singleton.Channel == XAuthorizationChannel.XAuthorization_WeChat)
			{
				if (!this.CheckWXInstalled())
				{
					return false;
				}
			}
			return true;
		}

		// Token: 0x06010E5B RID: 69211 RVA: 0x0044796C File Offset: 0x00445B6C
		public bool IsOppositeSex(int one, int two)
		{
			one %= 10;
			two %= 10;
			List<int> intList = XSingleton<XGlobalConfig>.singleton.GetIntList("MaleTypeList");
			List<int> intList2 = XSingleton<XGlobalConfig>.singleton.GetIntList("FemaleTypeList");
			return (intList.Contains(one) && intList2.Contains(two)) || (intList.Contains(two) && intList2.Contains(one));
		}

		// Token: 0x06010E5C RID: 69212 RVA: 0x004479DC File Offset: 0x00445BDC
		public void ShareToWXFriendBackEnd(string openID, string title, string desc, string tag)
		{
			Dictionary<string, object> dictionary = new Dictionary<string, object>();
			dictionary["openId"] = openID;
			dictionary["title"] = title;
			dictionary["description"] = desc;
			dictionary["thumbMediaId"] = "";
			dictionary["mediaTagName"] = tag;
			dictionary["messageExt"] = "ShareWithWeixin";
			string text = Json.Serialize(dictionary);
			XSingleton<XDebug>.singleton.AddLog("ShareToWXFriend paramStr = " + text, null, null, null, null, null, XDebugColor.XDebug_None);
			XSingleton<XUpdater.XUpdater>.singleton.XPlatform.SendExtDara("share_send_to_friend_wx", text);
		}

		// Token: 0x06010E5D RID: 69213 RVA: 0x00447A80 File Offset: 0x00445C80
		public void ShareToQQFreindBackEnd(string openID, string title, string desc, string tag, string targetUrl, string imageUrl, string previewText)
		{
			Dictionary<string, object> dictionary = new Dictionary<string, object>();
			dictionary["act"] = 1;
			dictionary["openId"] = openID;
			dictionary["title"] = title;
			dictionary["summary"] = desc;
			dictionary["targetUrl"] = targetUrl;
			dictionary["imageUrl"] = imageUrl;
			dictionary["previewText"] = previewText;
			dictionary["gameTag"] = tag;
			string text = Json.Serialize(dictionary);
			XSingleton<XDebug>.singleton.AddLog("SharePkToQQFriend paramStr = " + text, null, null, null, null, null, XDebugColor.XDebug_None);
			XSingleton<XUpdater.XUpdater>.singleton.XPlatform.SendExtDara("share_send_to_friend_qq", text);
		}

		// Token: 0x06010E5E RID: 69214 RVA: 0x00447B40 File Offset: 0x00445D40
		public void PandoraPicShare(string accountType, string scene, string objPath)
		{
			//zcg 
			//XSingleton<XDebug>.singleton.AddLog(string.Concat(new string[]
			//{
			//	"UiUtility PandoraPicShare : accountType = ",
			//	accountType,
			//	",scene = ",
			//	scene,
			//	",objPath = ",
			//	objPath
			//}), null, null, null, null, null, XDebugColor.XDebug_None);
			//GameObject gameObject = GameObject.Find(objPath);
			//bool flag = gameObject != null;
			//if (flag)
			//{
			//	XSingleton<XDebug>.singleton.AddLog("UiUtility PandoraPicShare find obj", null, null, null, null, null, XDebugColor.XDebug_None);
			//	Bounds boundsIncludesChildren = XSingleton<XUpdater.XUpdater>.singleton.XPandoraManager.GetBoundsIncludesChildren(gameObject.transform);
			//	Vector3 vector = XSingleton<XGameUI>.singleton.UICamera.WorldToScreenPoint(boundsIncludesChildren.min);
			//	Vector3 vector2 = XSingleton<XGameUI>.singleton.UICamera.WorldToScreenPoint(boundsIncludesChildren.max);
			//	Rect rect = new Rect(vector.x, vector.y, vector2.x - vector.x, vector2.y - vector.y);
			//	//zcg XSingleton<XScreenShotMgr>.singleton.PartCaptureScreen(rect, accountType, scene);
			//}
		}

		// Token: 0x06010E5F RID: 69215 RVA: 0x00447C40 File Offset: 0x00445E40
		public void OneKeyAddQQFriend(string openID, string friendName)
		{
			if (Application.platform == (RuntimePlatform)8)
			{
				XSingleton<PDatabase>.singleton.shareCallbackType = ShareCallBackType.AddQQFriend;
			}
			string name = XSingleton<XAttributeMgr>.singleton.XPlayerData.Name;
			string @string = XStringDefineProxy.GetString("FRIEND_ADD_QQ_FRIEND_REMARK", new object[]
			{
				friendName
			});
			string string2 = XStringDefineProxy.GetString("FRIEND_ADD_QQ_FRIEND", new object[]
			{
				name
			});
			Dictionary<string, object> dictionary = new Dictionary<string, object>();
			dictionary["openId"] = openID;
			dictionary["desc"] = @string;
			dictionary["verifyMsg"] = string2;
			string text = Json.Serialize(dictionary);
			XSingleton<XDebug>.singleton.AddLog("AddQQFriend paramStr = " + text, null, null, null, null, null, XDebugColor.XDebug_None);
			XSingleton<XUpdater.XUpdater>.singleton.XPlatform.SendExtDara("add_game_qq_friend", text);
		}

		// Token: 0x06010E60 RID: 69216 RVA: 0x00447D0C File Offset: 0x00445F0C
		public void ShowPressToolTips(bool pressed, string content, Vector3 pos, Vector3 offset)
		{
			DlgBase<PressTipsDlg, PressTipsBehaviour>.singleton.Setup(pressed, content, pos, offset);
		}

		// Token: 0x06010E61 RID: 69217 RVA: 0x00447D20 File Offset: 0x00445F20
		public bool ToDownLoadCorrectPackage(IXUIButton button)
		{
			RuntimePlatform platform = Application.platform;
			if (platform != (RuntimePlatform)8)
			{
				if (platform == (RuntimePlatform)11)
				{
					string @string = XSingleton<XStringTable>.singleton.GetString("XUPDATE_ERROR_VERSIONNOTMATCH_ANDROID_URL");
					XSingleton<XDebug>.singleton.AddLog("AndroidAppStore Url: ", @string, null, null, null, null, XDebugColor.XDebug_None);
					Application.OpenURL(@string);
				}
			}
			else
			{
				string string2 = XSingleton<XStringTable>.singleton.GetString("XUPDATE_ERROR_VERSIONNOTMATCH_URL");
				XSingleton<XDebug>.singleton.AddLog("AppStore Url: ", string2, null, null, null, null, XDebugColor.XDebug_None);
				Application.OpenURL(string2);
			}
			return true;
		}

		// Token: 0x06010E62 RID: 69218 RVA: 0x00447DA8 File Offset: 0x00445FA8
		public bool ToDownLoadCorrectPackagePre(IXUIButton button)
		{
			RuntimePlatform platform = Application.platform;
			if (platform != (RuntimePlatform)8)
			{
				if (platform == (RuntimePlatform)11)
				{
					string @string = XSingleton<XStringTable>.singleton.GetString("XUPDATE_ERROR_VERSIONNOTMATCH_ANDROID_PRE_URL");
					XSingleton<XDebug>.singleton.AddLog("AndroidAppStore Url: ", @string, null, null, null, null, XDebugColor.XDebug_None);
					Application.OpenURL(@string);
				}
			}
			else
			{
				string string2 = XSingleton<XStringTable>.singleton.GetString("XUPDATE_ERROR_VERSIONNOTMATCH_URL");
				XSingleton<XDebug>.singleton.AddLog("AppStore Url: ", string2, null, null, null, null, XDebugColor.XDebug_None);
				Application.OpenURL(string2);
			}
			return true;
		}

		// Token: 0x04007C29 RID: 31785
		private StringBuilder _Timebuilder = new StringBuilder();

		// Token: 0x04007C2A RID: 31786
		private int[] TimeDuaration = new int[]
		{
			2592000,
			86400,
			3600,
			60,
			1
		};

		// Token: 0x04007C2B RID: 31787
		private string[] TimeDuarationName = new string[]
		{
			"MONTH_DUARATION",
			"DAY_DUARATION",
			"HOUR_DUARATION",
			"MINUTE_DUARATION",
			"SECOND_DUARATION"
		};

		// Token: 0x04007C2C RID: 31788
		private string[] TimeName = new string[]
		{
			"MONTH_DUARATION",
			"DAY_DUARATION",
			"HOUR_DUARATION",
			"MINUTE_TIME",
			"SECOND_DUARATION"
		};

		// Token: 0x04007C2D RID: 31789
		private string[] NumberSeparatorNames = null;

		// Token: 0x04007C2E RID: 31790
		private string wifiBtn;

		// Token: 0x04007C2F RID: 31791
		private uint wifi_green = 0U;

		// Token: 0x04007C30 RID: 31792
		private uint wifi_yellow = 0U;

		// Token: 0x04007C31 RID: 31793
		private bool wifi_forward = true;

		// Token: 0x04007C32 RID: 31794
		private float wifi_duration = 1f;

		// Token: 0x04007C33 RID: 31795
		private float wifi_cur = 0f;

		// Token: 0x04007C34 RID: 31796
		public List<string> ComSpriteStr = new List<string>();
	}
}
